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

REG 6.7.3 -> 6.8.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.8, 6.9
    • PySide
    • None
    • Linux/Wayland
    • 13

      This minimal example does not show the window icon. The image file is next to the script.

      from PySide6.QtWidgets import QApplication, QWidget
      from PySide6.QtGui import QIcon
      import os
      import sys
      
      class Window(QWidget):
          def __init__(self):
              super().__init__()
              self.resize(250, 150)
              self.setWindowTitle('Window Icon')
              here = os.path.dirname(__file__)
              icon = os.path.join(here, 'web.png')
              self.setWindowIcon(QIcon(icon))
      
      if __name__ == '__main__':
          app = QApplication(sys.argv)
          window = Window()
          window.show()
          sys.exit(app.exec())
      
      

      I am on Ubuntu 22.04. I am using python3.11.

      If you are on PySide6.8 or higher, it does not work. Lower than 6.8 it works.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            blindchicken Jacques Combrink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes