-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8, 6.9
-
None
-
-
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.
- relates to
-
QTBUG-101427 setWindowIcon has no effect on KDE/Wayland
-
- Closed
-