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

QWindow::setGeometry() won't update QWindow::screen() if no platform window exists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7
    • GUI: Window management
    • Linux/Wayland, Linux/X11

    Description

      QQuickWindow window;
      window.screen(); // returns the primary screen
      window.setGeometry(geometry on another output);
      window.screen(); // still returns the primary screen
      

      QWindow::setGeometry() won't update QWindow::screen() if the platform window has not been created. It produces unexpected results in code that assumes that there exists correlation between the geometry and the screen.

      As a workaround, one can call QWindow::setScreen() after QWindow::setGeometry(). But shouldn't QWindow::setGeometry() update the screen?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            zzag Vlad Zahorodnii
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes