Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to open a main window in a second monitor with 'Qt Quick'
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Quizilla
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Quizilla
        wrote on last edited by
        #3

        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!!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved