Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2706

setWindowState(Qt.WindowMaximized) does not work anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.7.0
    • PySide
    • None
    • Ubuntu 24.04. in venv

    Description

      I write a short program. If I include the line with "Qt.WindowMaximized" the code will not start. If I exclude the line, the program starts immediately.

      import sys
      from PySide6.QtCore import Qt
      from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton
      
      class MainWindow(QMainWindow):
          def __init__(self):
              super().__init__()
              self.setWindowTitle("My App")
              self.setWindowState(Qt.WindowMaximized)  # comment out/in for success/failure
              button = QPushButton("Press Me!")
              self.setCentralWidget(button)
      
      app = QApplication(sys.argv)
      window = MainWindow()
      window.show()
      app.exec()
      

      Attachments

        1. test.py
          0.4 kB
          Steffen Brinckmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            steffen_brinckmann Steffen Brinckmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes