Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121559

QML - Windows - Keep a Window in the bottom right corner of the screen



    • Windows


      I want to keep the window of my application in the bottom right corner of the screen.

      According to the Qt documentation this should be simple : 


      Unfortunately the above doesn't work under Windows in multiple cases : 

      1.: When I am using multiple screens, and the screen alignment is configured like this : 

      I get this result :

      This is caused by the above `desktopAvailableWidth` and `desktopAvailableHeight` properties giving back the bounding rectangle of all the screens combined.

      2.: When I attach an external screen to my laptop, and configure the external screen to be the main screen

      the window disappears. (I guess that it is positioned somewhere outside of the screens.)


      I attached a sample project which could be used to reproduce the above issues : PinToBottomRightTest1.zip

      What would be the solution for keeping a Window in the bottom right corner of the screen?
      The solution would need to work on macOS and Windows at least.
      The solution should also work in multi-screen environments.
      Bonus : I would prefer to keep the window always on the Primary Screen.


        1. image-2024-01-26-16-08-09-155.png
          2 kB
          Csaba Szigeti
        2. image-2024-01-26-16-08-19-051.png
          2 kB
          Csaba Szigeti
        3. image-2024-01-26-16-09-14-017.png
          36 kB
          Csaba Szigeti
        4. image-2024-01-26-16-09-19-250.png
          36 kB
          Csaba Szigeti
        5. image-2024-01-26-16-12-06-406.png
          20 kB
          Csaba Szigeti
        6. image-2024-01-26-16-12-06-406-1.png
          30 kB
          Csaba Szigeti
        7. PinToBottomRightTest1.zip
          2 kB
          Csaba Szigeti
        8. Screenshot 2024-01-26 at 15.40.41.png
          235 kB
          Csaba Szigeti
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            vestbo Tor Arne Vestbø
            csnt Csaba Szigeti
            1 Vote for this issue
            4 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes