Skip to content Skip to sidebar Skip to footer

Pyqt: Dialog's Minimize Window Button Is Missing In Osx

A dialog created with: class GUI(QtGui.QMainWindow): def __init__(self): super(GUI, self).__init__() global dialog dialog = QtGui.QDialog() myGui = GUI() is missing

Solution 1:

I can't test this myself, but you could try setting these window flags:

    dialog.setWindowFlags(dialog.windowFlags() |
        QtCore.Qt.WindowMinimizeButtonHint |
        QtCore.Qt.WindowSystemMenuHint)

(The WindowSystemMenuHint flag may not be necessary).

Solution 2:

QtGui.QDialog does not offer a minimize button on any platform, but QtGui.QMainWindow does offer on each platform (Windows, Linux and OSX). You are creating a QDialog object and at the same time an object of GUI which is subclass of QMainWindow. If you write myGui.show() the window will offer you all three buttons (minimize, maximize/restore and close). But in case of dialog.show(), you will not have two of them (minimize and maximize/restore). It's Qt's limitation.

Post a Comment for "Pyqt: Dialog's Minimize Window Button Is Missing In Osx"