Forum > QT

Qt5 on Gnome wrong top and left

(1/2) > >>

OK, seeing something quite strange here.

On Debian Gnome Bookworm, using qt5 widget set, a non modal form reports its Left and Top coordinates incorrectly.  It tells me keft is -30 when the form is clearly in the middle of the screen.

Am I missing something here ?

Further investigation as time permits ....


Just to be specific about the above :

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.SpeedButton2Click(Sender: TObject);begin    LabelLeft.Caption := inttostr(Left);    LabelTop.Caption  := inttostr(Top);end;    

Tells me the window is at -3, -30 where ever I locate it on the screen.

I have reported this issue here.

Attached is a very simple demo.


I have established the problem definitely relates to use of Wayland, turn Wayland off and things work normally.

This behavior is a particular problem when one form pops up another, user will expect the new form to position itself near the first one, its either up near top left of screen (gnome) or towards bottom right (KDE).

As the adoption of wayland seems unstoppable, this is a major issue.

Attached is a very simple demo.

I've already answered on issue, but I was wrong. ATM, wayland does not support window positioning at all. Even window activating is in standard protocols from 12/2023 . As I can find over google, xdg_toplevel_move() and it's read x,y sibling will be something that can guarantee correct x,y of toplevel window. Now, it does not work with Qt5 and Qt6 because of poor wayland implementations.


[0] Message Index

[#] Next page

Go to full version