How do I enable all options in the context menu of a QDialog? (Minimize and maximize). I only find help about enabling the window flags, but that's not really necessary.
Asked
Active
Viewed 388 times
1 Answers
1
As you can see in Qt doc, Qt::Dialog flag deactivates Minimize/Maximize options.
To enable it, you need to change window flags using the method:
setWindowFlags(Qt::Window);
What's more, if you want to be able to minimize your dialog box alone you need to add these methods:
setParent(NULL);
setWindowModality(Qt::NonModal);
In fact, your QDialog becomes a QWindow.

double_g
- 836
- 7
- 9
-
Helpful answer. My window was already NonModal. In python the line reads "myapp.setWindowFlags(QtCore.Qt.WindowMinMaxButtonsHint)" – Rol May 06 '16 at 09:56