Can't move window to center of screen.
-
I've seen a way online to get the coordinates for the center of the screen, and at the end, it calls the move function to move it to the relevant coordinates. My move function does not do anything, and I don't see anyone else online having the same issue.
I'm using Qt Creator. Here's the constructor for the first window.
StartScreenWindow::StartScreenWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::StartScreenWindow) { ui->setupUi(this); this->move(900, 900); }The window still stays only at the top left. There are no errors. The only warning I have is "QSocketNotifier: Can only be used with threads started with QThread" which from what I found online is something wrong with a library and not for me to fix, so I don't think it's relevant.
-
I've seen a way online to get the coordinates for the center of the screen, and at the end, it calls the move function to move it to the relevant coordinates. My move function does not do anything, and I don't see anyone else online having the same issue.
I'm using Qt Creator. Here's the constructor for the first window.
StartScreenWindow::StartScreenWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::StartScreenWindow) { ui->setupUi(this); this->move(900, 900); }The window still stays only at the top left. There are no errors. The only warning I have is "QSocketNotifier: Can only be used with threads started with QThread" which from what I found online is something wrong with a library and not for me to fix, so I don't think it's relevant.
-
@Vad_i
The gist is, Wayland, or at least the default compositor I think, does not allow window positioning. Period. You can search posts on this forum which end up to that effect. If you can test with X11 I imagine you'll find it works. -
V Vad_i has marked this topic as solved on