How Can I understand where mainWindow is?
-
there is a way to understand where is the MainWindow?
I used mainWindow::pos and I noticed that when it's in the first screen MainWindow::pos().width()= -1, but I don't know if it's always -
there is a way to understand where is the MainWindow?
I used mainWindow::pos and I noticed that when it's in the first screen MainWindow::pos().width()= -1, but I don't know if it's always@vale88 sorry, I explained badly, I saw that when mainWindow is in the first screen this->pos().x()=-1, but I don't know if it's right for all the screens
-
Hi
Why do you want to know ?
you can always check the screen its on
QScreen *screen = widget/mainwin->window()->windowHandle()->screen();
the x() should change depending on screen but i never checked it. -
Hi
Why do you want to know ?
you can always check the screen its on
QScreen *screen = widget/mainwin->window()->windowHandle()->screen();
the x() should change depending on screen but i never checked it.@mrjj ok tomorrow I try, so in this way I obtain 0 or 1 and I understand which is the screen..
-
@mrjj ok tomorrow I try, so in this way I obtain 0 or 1 and I understand which is the screen..
@vale88
well you get the actual screen object.
https://doc.qt.io/qt-5/qscreen.html
It can tell you size and tons other stuff about the screen. -
@vale88
well you get the actual screen object.
https://doc.qt.io/qt-5/qscreen.html
It can tell you size and tons other stuff about the screen.@mrjj if I write this I obtain the name of the screen , but I need only to know if it's the first screen or the secondary
-
@mrjj if I write this I obtain the name of the screen , but I need only to know if it's the first screen or the secondary