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

Python crash when closing qmainwindow with qdialog open

I have a QMainWindow that launches a QDialog everytime I click on a button and I can't figure out why the python binary crashes when I close the QMainWindow while one or more dialogs are open. It's not a complex Qt app and I'm really struggling…
sevenup
  • 170
  • 8
0
votes
2 answers

Adjust position of items in QDialog

I have to show a find dialog which will search in a QTableView. I have the following code: def handleFind(self): findDialog = QDialog() findLabel = QLabel("Find what", findDialog) findField = QLineEdit(findDialog) findButton =…
Orcl User
  • 293
  • 1
  • 5
  • 20
0
votes
2 answers

How to call plain function from exec()?

I have 2 classes: one maintains some loop (at leas for 2-3 minutes; and is inherited from QObject) and another shows up a progress dialog (inherited from QDialog). I want to start the loop as soon as the dialog is shown. My first solution was: int…
Illia Levandovskyi
  • 1,228
  • 1
  • 11
  • 20
0
votes
1 answer

On click new QDailog window overlaps with old window and everything becomes very messy , focus still remain on old window

Overview: I have designed QPushbutton in some window which when clicked open a new Dialog Window( Say start_backup_window) . In this window I have Designed another QPushbutton say check_backup_option_button which when clicked should open another…
samprat
  • 2,150
  • 8
  • 39
  • 73
0
votes
0 answers

QInputDialog different behaviour on mouse click and Enter pressed

Hello I have written a program in which I add graphics items in a QGraphicsView. I have a GraphicsScene which is bigger than the view. I'm using QInputDialog's getText function to change the text of the graphics items. If I click the OK button with…
Expr
  • 25
  • 1
  • 5
0
votes
1 answer

BB10 Show System Dialog in QThread Slot is not working

Im trying to show dialog in thread, it shows for the first time. If I dont use isAlert, it shows 10-15 dialogs Here is my code: bool isAlert; void MyThread::ShowAlert(const QString &message) { if(!isAlert){ SystemDialog *myDialog = new…
Satish Bejgum
  • 223
  • 2
  • 16
0
votes
1 answer

Why the QTableView is painted black when i resize the Dialog?

I have a problem when the resize function, I do this in the click signal: if(ShowingDetails){ ui->BtShowingData->setText("<< Hide details"); //this->setMaximumWidth(1050); //this->setMinimumWidth(1050); this->resize(1050,…
bluesky777
  • 400
  • 6
  • 23
0
votes
1 answer

QDialog will not appear except if I call it?

This does not work: void MainWindow::on_left_win_clicked() { Dialog *dialog1 = new Dialog(this); dialog1->show(); return; } However this does: void MainWindow::on_left_win_clicked() { QDialog *dialog1 = new QDialog(this); …
trippedoutfish
  • 357
  • 1
  • 4
  • 8
0
votes
1 answer

Return value of Qdialog execution

I am calling a QDialog on a click event of a QPushButton. I want to execute that dialog as a Qt::Sheet or Qt::Drawer. For this i am using exec() int Qdialog::exec(); method but it executes it as a popup dialog instead of Qt::Sheet or Qt::Drawer.…
Ashish
  • 219
  • 2
  • 6
  • 22
0
votes
1 answer

QDialog paints widgets black when adding new ones

I am writing a QDialog to allow exporting data from the rest of my program. The dialog asks as series of questions depending on the previous answers given. There are three different types of question that can be asked, with a QComboBox, QList or a…
dempzorz
  • 1,019
  • 13
  • 28
0
votes
1 answer

QDialog and scroll areas: how to merge them?

From the ImageViewer example: ImageViewer::ImageViewer() { imageLabel = new QLabel; imageLabel->setBackgroundRole(QPalette::Base); imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); …
Pietro
  • 12,086
  • 26
  • 100
  • 193
0
votes
1 answer

How to handle a QDialog displayed out of screen?

I have a main widow. I move it to an bottom edge or corner. Then I open a dialog by click some button in it. The dialog is positioned at the center of the main window since I set the main window as its parent. However, the dialog is not displayed on…
user1899020
  • 13,167
  • 21
  • 79
  • 154
0
votes
1 answer

Send image path to another function

I have a mainWindow and a Dialog in Qt . I am opening two images in MainWindow . After I make operations with image (crop, resize, rotate ) on MainWindow . I want to send images to another window (QDialog) . How can i send it as a parameter? My…
goGud
  • 4,163
  • 11
  • 39
  • 63
0
votes
1 answer

QMainWindow opacity work, Qdialog not

I am trying to do an easy application MainWindow where I have one Pushbutton. After It's clicked QDialog its opened. I want to make QDialog transparent but it is not working. void MainWindow::on_pushButton_clicked() { QDialog *qd = new…
kajojeq
  • 886
  • 9
  • 27
0
votes
1 answer

Qt When will the dialog return QDialog::Rejected

I'm in trouble. I have a QDialog as a login form. When I log in, the form closes and my mainwindow will appear. My login is fine but when it closes it returns QDialog::Rejected. What can I do to prevent the return of QDialog::Rejected? And when…