Can't center QWidget on Wayland Screen

Ubuntu by default sets it’s windowing system to Wayland and I’ve found any window I create I can’t center on my screen. I’ve checked and multiple others have the same problem and it doesn’t look like a fix is coming anytime soon. Why would Ubuntu make this the default when it causes so many problems for developers ?

Switching to X11 does solve my centering problem but creates others (touch screen disappears, pen doesn’t consistently work).

Has anyone out there come up with a work-around or hack of some sort ?

Plasma can centre windows, but it would be all windows. I bet Gnome will have extensions to do this.

Wow xircon …

Great tip, I would have never thought to check under desktop settings to see if there’s a setting to center windows. I had installed Gnome Tweaks (an extension) recently but never looked under the windows settings and sure enough … Center New Windows was off. Enabling it now corrects my app positioning problem !

The only annoying thing left is the Modal Dialog is still not working properly still but I definitely can work with this…

1 Like

PS… don’t hold any hopes that the PYQT6 window flags will be fixed anytime soon. I spoke directly with both parties (Wayland / PyQT6) and while Wayland asserts that their windowing systems can center and display a model dialog the PYQT6 people don’t want to address this issue at the present time…