how to disable the window maximize icon using PyQt4?

后端 未结 4 1714
自闭症患者
自闭症患者 2021-02-06 01:18

I would like to know how to disable the window Maximise button in pyqt4. I am at present using QWidget.setFixedSize (self, QSize) to prevent user window resizing, however the ma

4条回答
  •  面向向阳花
    2021-02-06 01:55

    This works perfectly:

    MainWindow.setWindowFlags(QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint)
    

提交回复
热议问题