What can I do for my QtWidget-Program's Window correctly positioned on the screen?
-
thank you very much,
but I had watch that Video several days ago, the Video show us How to create a new Class by Qtwayland compositor with QML.
so I think maybe I need refactor all UI-Class such as QMessageBox or QDialog,This challenge is too difficult for me.
in my ubuntu22.04-lts,the wayland compositor is Xwayland.
my friend, your suggested「Turn weston off and turn Qtwayland compositor on」is mean I need do something with my Qtcreator or My PC system?
for example,what should I do in this Demo?
https://github.com/cppxiaozhu/Demo
If it is only for the correct position of the message prompt window of the compiled APP, then it is the easiest way to let their users no longer use the wayland desktop.
But I'm trying to do something to adapt this program to the wayland desktop.
I'm very depressed now because you guys say it's a wayland bug, and considering wayland's slow update mechanism, I don't think I'll see a solution in my lifetime.
As far as I know, the time it takes for wayland to fix some of its inherent problems needs to be counted in decades.
I've tried my best to find information, but almost none of them are particularly detailed.
-
@foghere2023 I do not have an answer for you now. But I will take a look at it later.
-
After a long time, the problem remains unsolved.
-
@foghere2023 said in What can I do for my QtWidget-Program's Window correctly positioned on the screen?:
After a long time, the problem remains unsolved.
I don't think it's the correct place here when you want wayland improvements.
-
It's a pity that qwidget can't adapt to the new changes brought by wayland.
-
Maybe a workaround?
QMessageBox mMessageBox; int x = this->x(); int y = this->y(); mMessageBox.setGeometry(x,y,300,100);
-
thank you , but it doesn't work,the Dialog cannot move itself to by 'move' func ,somebody says that wayland not provide coordinate data
-
someone tell me :『Wayland does not support manual positioning』
-
int x = this->geometry().x(); int y = this->geometry().y(); qDebug() << "Window position: (" << x << ", " << y << ")";
the 「window position」is (0,0) forever
-
@foghere2023 Yes thank you! I apologize. I should have checked better.
-
now,just use xcb like this for wayland user『QT_QPA_PLATFORM=xcb ./testApp』
-
@foghere2023
thanks for the tip , mid 2024 and the issue is still here with wayland