Hi,
Has Qt any functions to enumerate the displays on a system and to force an application to start on the first or second display?
Thanks,
Hi,
Has Qt any functions to enumerate the displays on a system and to force an application to start on the first or second display?
Thanks,
Òscar Llarch i Galán
QApplication::desktop ()->numScreens () gets number of screens. I suppose that you should keep digging QDesktopWidget reference to do what you want
C++ & AMD forever
Hi,
Thanks, I was searching for "display", "screen" and had not think on "desktop".
Òscar Llarch i Galán
Hi,
The problem is, how can I force my application to start to the second display?
I'm creating an application that have no frame, so it can't be moved by mouse to the other display.
Thanks,
Òscar Llarch i Galán
Hi,
Qt Code:
myMainWindow mainWindow(app.desktop()->screen(iScreen));To copy to clipboard, switch view to plain text mode
I can take the desktop as a widget an set it as the parent of my QMainWindow.
Thanks,
Òscar Llarch i Galán
Hi,
I have a problem,
The problem is that "isVirtualDesktop" is returning me true, and the number of screens return me 2.
Qt Code:
bool b = app.desktop()->isVirtualDesktop(); //trueTo copy to clipboard, switch view to plain text mode
pDesktop0 and pDesktop1 point to the same memory data.
Òscar Llarch i Galán
Hi,
Finally I solved this problem on Virtual Desktops:
Qt Code:
//Move the MainWindow to left by horizontal pixels(horizontal resolution) mainWindow.move((iScreen-1)*(qAvGeometry.width()+1),0);To copy to clipboard, switch view to plain text mode
Òscar Llarch i Galán
Bookmarks