Did not work with him, but studies seem to indicate a mess with the window flags.
QWidget has a method called setWindowFlags
.
Here is the document for the Qt.WindowFlags class.
Here is a link for all flags. Find Qt.WindowMaximizeButtonHint
In general, it seems that you need to find a way to enable the Qt.CustomizeWindowHint
flag and disable the Qt.WindowMaximizeButtonHint
flag. In any case, you probably want this in addition to setFixedSize
, so that a good start.
Edit:
Sort of
win.setWindowFlags(win.windowFlags() | QtCore.Qt.CustomizeWindowHint) win.setWindowFlags(win.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint)
Assuming your import is something like this
from PyQt4 import QtCore
This will enable the CustomizeWindowHint
flag and disable the WindowMaximizeButtonHint
flag, hopefully. Let me know if this works at all.
Edit:
As the OP discovered, the only call requirement was the following:
win.setWindowFlags(QtCore.Qt.WindowMinimizeButtonHint)
Brian source share