Questions tagged [qdialog]

A QDialog is a class from the Qt Toolkit which is the base class for dialog windows.

QDialog serves as a base class in constructing dialog windows. It is different from an ordinary window or widget, because it has a return value, and default buttons. Dialogs can also be made modal or non-modal.

Qt offers a set of default dialogs derived from this class, and allows developers to make custom dialogs by deriving from QDialog. QDialog is always a top-level widget, but if it has a parent, its default location is centered on top of the parent's top-level widget (if it is not top-level itself)

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

467 questions
0
votes
1 answer

Get several values from the user in Qt?

I am working on an application which uses the QInputDialog command to get a value from the user. The value is then used in several computation in the application. Now I want to the able to read several values from the user before the computations…
madalina
  • 377
  • 2
  • 7
  • 15
0
votes
1 answer

How to keep modal behabiour in a QDialog with Qt::CustomizeWindowHint?

Modality of a QDialog doesn´t work when disabling all frame using the CustomizeWindowHint on setWindowFlags... QDialog dialog(getMainW()); dialog.setObjectName("dialog"); dialog.setWindowFlags( Qt::CustomizeWindowHint…
Darkgaze
  • 2,280
  • 6
  • 36
  • 59
0
votes
1 answer

QDockWidget is not docked on a QDialog

Is it correct to use a QDockWidget on a QDialog? When I tried to use it, dock widget did not get docked on the dialog window. I could not resize the dock widget when I executed the application.
fatma.ekici
  • 2,787
  • 4
  • 28
  • 30
0
votes
1 answer

QWidget::setFixedHeight() not working/still resizable

I recently moved to Qt5 and encountered a problem i'm not getting in Qt4. I have a modal dialog that needs to have a fixed height but a resizeable width. For demonstration here's a stripped down version. QDialog dialog; QHBoxLayout hLayout; …
Subaru Tashiro
  • 2,166
  • 1
  • 14
  • 29
0
votes
1 answer

PyQt multiple QDilaog class signal catching

I have a PyQt Gui application that has multiple QDialog windows that I use to plot data using matplotlib widget. This is the code I'm using is below. Only one emitted signal is caught. Which ever QDialog is created last catches it's emitted signal.…
JMD
  • 405
  • 1
  • 9
  • 17
0
votes
2 answers

Launch window, process data, and close it without user interaction?

When the program first boots up, sometimes updating components will be required. The updating task should happen automatically, without any user interaction. I want to show a simple window that will show the progress. When it'll be done, the window…
iTayb
  • 12,373
  • 24
  • 81
  • 135
0
votes
1 answer

How to add About dialog to project

I have just completed my first Qt 5 project and I want to add an About dialog. Is there a default, and how do you use it? If not, what's the best way to add one and edit it and display its content using the Help menu action? Any help would be…
te7
  • 601
  • 1
  • 6
  • 23
0
votes
1 answer

QDialog closing crash

I have problem in ensuring the dialog is closed/released with the following Qt codes. //Segment 1: To open a 'wait' dialog for some long-running tasks void MainWindow::ui_showProgressDialog(QString title) { dlgProgress = new…
YamHon.CHAN
  • 866
  • 4
  • 20
  • 36
0
votes
3 answers

How to return from exec method programmatically in static singleton class

I am developing Qt application (Qt version 4.7.3) on SBC6000x board. I have a MessageBox class derived from QDialog. I have made this class singleton. Whenever a messagebox is to be show I am using .exec method to show it. There are few places where…
RajendraW
  • 55
  • 1
  • 2
  • 11
0
votes
1 answer

How to flush the QWidget Painting-Cache?

I'm working on a custom styled QMessageBox. In my custom QStyle class in method polish() I call: if( (pDialog = qobject_cast( pWidget )) != NULL ) { pDialog->setWindowFlags( pDialog->windowFlags() | Qt::FramelessWindowHint ); //…
Charly
  • 1,270
  • 19
  • 42
0
votes
1 answer

Qt Issue - mouse button released after A Modal QDialog closed

Parent widget doesn't respond to first mouse click after Modal QDialog closed, the QDialog is closed by calling done() in mousemoveevent() and this causes the mouse button is still being pressed after the dialog is closed, the second click onward…
Casey Lim
  • 1
  • 2
0
votes
1 answer

Transfer inputs from qdialog to mainwindow

In qdialog i put some input that i need in the mainwindow, how can i get them? my program is something like this, I have a qdialog that must open before mainwindow, I put there some input and click ok, and then the mainwinodw opens using those…
SamuelNLP
  • 4,038
  • 9
  • 59
  • 102
0
votes
1 answer

Qt - confused on QDialog choice on main

I have the following Qt code: int main(int argc, char *argv[]) { QApplication app(argc, argv); ChoosingDialog cdlg; if(!startWin.exec()) { // nothing chosen return 0; } if(cdlg.firstWindowSelected) { …
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
0
votes
1 answer

Qt QDialog with hide and WA_QuitOnClose

I have a problem, I'm calling my QDialog like this in the main(): app.setQuitOnLastWindowClosed(true); splashWin startWin; if(!startWin.exec()) { // Rejected return EXIT_SUCCESS; } // Accepted, retrieve the data startWin.myData... And in…
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
0
votes
1 answer

How to use QFileDialog::getSaveFileName(...) under MacOS

I'm currently testing a software written for windows under MacOS X.6. And most stuff works already, but Currently I'm stuck with 1 thing: The native SaveFileName Dialog under Mac. QString fileName = m_sSaveAsDir + "untitled." +…
Donny
  • 549
  • 2
  • 10
  • 24