QT Window not centering.
-
Is there a possibility to center a window in QT without it being overwritten by the OS. I have ab application that swaps windows and every window appears on different random coordinates on my screen. I would like to center all of them. I have tried everything I saw online such as setGeometry(), overwritting showEvent(), adjusting screeen width/height, using QDesktopWidget etc. None of these work for me.
-
@elitsa said in QT Window not centering.:
am working on PyQt6 with exact version 6.4.2.2.3
On Wayland?
-
As @Christian-Ehrlicher was seemingly pointing in this direction, wayland has taken it upon itself to decide that clients are not special enough to manager their own layout locations...it's connected to some kind of a paranoid security concept...Yet another in a line of reasons I won't use a wayland backed display.
-
Thank you both @Christian-Ehrlicher , @Kent-Dorfman ! I changed it and now it no longer runs on Wayland and it renders in the middle :)) This was so helpful! Thanks again!