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

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

    XMLWordPrintable

Details

    • Windows

    Description

      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 : 


      Ref.:
      https://doc.qt.io/qt-5/qml-qtquick-window-screen.html#desktopAvailableHeight-attached-prop
      https://doc.qt.io/qt-5/qml-qtquick-window-screen.html#desktopAvailableWidth-attached-prop 

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: