Is Wayland breaking the showing of PyQt5 window icons?

JakobDev jakobdev at gmx.de
Fri Dec 22 13:13:28 GMT 2023


Windows can't set a Icon on Wayland. The set the Name of the Desktop
file and the Windows will have the Icon of the Desktop file. On Qt you
can use the setDesktopFileName() function of QApplication for that.
Windows also can't move themself under Wayland. There' a protocol in the
making to allow this
(https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/264),
but it's not there yet. Wayland is in general way more restricted than
X11 and Windows. You should also keep in mind that the behaviour may
differ from Desktop to Desktop.

Am 22.12.23 um 13:14 schrieb ullix:
> Looks like this PyQt5 command is also ignored on Wayland:
>
> self.setGeometry(xpos, ypos, sw, sh)
> ullix
>
> Am 22.12.23 um 10:57 schrieb ullix:
>>
>> Using a PyQt5 dialog with setting "dialog.setWindowIcon(myIcon)" on a
>> Raspi OS (based on Debian bookworm, running a Wayland server by
>> default) has no effect. Not myIcon is shown, but instead always the
>> default Python icon Datei:Python-logo-notext.svg – Wikipedia
>>
>> I read this is due to a bug in Wayland; is that true?
>>
>> Are there other things in PyQt which don't work on Wayland?
>>
>> ullix
>>
>>


More information about the PyQt mailing list