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

Exec() QDialog after MainWindow appears

I want to make a Modal QDialog appear (with exec()) after the MainWindow appears itself. I tried to call exec in MainWindow::showEvent ( QShowEvent * event ) but It still show before the MainWindow appears. Any idea how could achieve this ?…
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
-1
votes
1 answer

Pyside6: Create QTabWidget with function rather than class

I've been trying to make an application using Pyside6 and can't seem to understand why we can't create a QDialog having QTabWidget with just functions. I am not sure if I am making a mistake somewhere so, here is the code I've wrote: Imports: from…
-1
votes
1 answer

How can I fix PyQt5 widget crash problem?

I was making a program with Python 3.7 & PyQt5 5.15.4, and I have a sudden crash issue. This is a simplified version which shows this phenomena. import sys from PyQt5.QtWidgets import QWidget, QPushButton, QDialog, QVBoxLayout, QApplication class…
-1
votes
2 answers

QComboBox doesn't display the currently selected item unless another button in the dialog is clicked

I have this QDialog: The QComboBox won't display the currently selected item unless any other button inside the dialog was clicked. Important thing to note is, that this only happens in the deployment. When I run the project in Qt it works just…
dasmanfred
  • 209
  • 2
  • 8
-1
votes
1 answer

Why QDialog not shows any widgets until job completed?

im new to pyqt5,i tried to open dialog and push some text into that dialog my dialog contain one plaintext ,progressbar and pushbutton when i run the code its popup the dialog but not shown any thing ,after code execution completes its showing all…
-1
votes
1 answer

Can I have multiple QDialog boxes along with my MainWindow in my application?

I have a QListwidget in my UI , The items of these are foods like Pizza Turkish Delight Pasta Cake ... I have 22 of items like these So whenever I double click on each item, I have a separate modal QDialogbox pop-up which shows its recipe and the…
-1
votes
1 answer

Using both show() + exec()

I'm working with code where next group of calls is frequently used: QDialog my_qDialog(my_parent); my_qDialog->setModal(false); my_qDialog->hide(); my_qDialog->show(); my_qDialog->exec(); I haven't found nothing about using of…
Igor
  • 53
  • 3
-1
votes
2 answers

How to access this variable Qt?

Sorry the question is going to be long. I dont know how to shorten this. I am new to Qt. With a little bit of experience in c++, I thought I should start with Qt to make my programs graphical. I chose a single user library management software as a…
Hemil
  • 916
  • 9
  • 27
-1
votes
1 answer

pass bool to qdialog

I'm trying to pass a bool to a qdialog via a setter method; the code compiles, but the value doesn't seem to take in the dialog. I've included just the pertinent code, I hope it's readable. What am I missing here? // forcequitDialog h…
Alan
  • 1,265
  • 4
  • 22
  • 44
-1
votes
1 answer

Qt5 Get response from child dialog

In my Qt5.7 program I have a password security. At some situations I want to ask user for password. I want to do it by separate QDialog. This dialog checks if password are good. And here is a problem. How Can I check from parent Dialog if…
km2442
  • 779
  • 2
  • 11
  • 31
-1
votes
2 answers

Does this Qt code leak memory?

I try to learn more about programming by studying open source using UML. The code I have found is in the stage between Qt 3 and Qt 4. The project is not that active so I ask this question here. Maybe I should add that the program using this code do…
Jim G
  • 43
  • 1
-1
votes
1 answer

How to QDialog semi-transparent?

I tried with QGraphicsOpacityEffect applied to the QDialog, but the result is a half gray widget and I cannot see the background and the activity behind, top-level widget.
user1414724
  • 29
  • 1
  • 6
-2
votes
3 answers

I wanna set check box margin ? alignment

I made some Qdialog , when I execute code, the checkbox is not evenly aligned : But I wanna like this : Here's the code: class SelectPay_Dialog2(Qdialog): def __init__(self): super().__init__() self.initUI() def…
ja c
  • 11
  • 2
-2
votes
1 answer

How can i stop a thread running in my Dialog Class from my mainWindow

My mainwindow looks like this it is a qlistwidget with some Job items, whenever any job item is clicked , it shows up the QDialogbox which looks like this. The QDialog has a listwidget and a show button, whenever the show button is clicked , a…
the_learnist
  • 69
  • 1
  • 8
-2
votes
1 answer

Overriding Qt function in classes

I have a simple dialog of type QDialog. When the uses clicks OK button I want to do some validation before closing the form and returning to caller (main form). I tried to add in my "CustomDialog.cpp" file the following code: void…
DEKKER
  • 877
  • 6
  • 19
1 2 3
31
32