How to open a main window in a second monitor with 'Qt Quick'



  • Hi,

    I'm an all brand new programmer in Qt Quick and I would like to open my only and main window in my second monitor. It sounds simple but I wasn't able to figure it out, despite the fact that I have delved into the forum. Can anyone help me please?

    Thank you!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    One way to do it is to get the geometry of your second screen using QDesktopWidget and then move your application window in that geometry.

    Hope it helps



  • Thank you for your reply,

    actually it helped me to manage this differently without using QDesktopWidget. I just move my window from the very beginning by setting x and y knowing the dimensions of my screen, and that's it!!


  • Lifetime Qt Champion

    It's also a solution but you have to know your screen dimensions. With QDesktopWidget you ensure that you are in a valid geometry and don't need to know your screen size.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.