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

QQuickWindow::screenChanged signal is not emitted after changing the display in Windows settings

    XMLWordPrintable

Details

    • Windows

    Description

      I have this sample code:

       

      import QtQuick 2.14
      import QtQuick.Window 2.14

      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")

          onScreenChanged: 

      {                console.log("screen changed")       }

      }

      I have two monitors.

      Steps to reproduce:

       

      Windows 11:

       

      1) Window is opened on secondary monitor

      2) Choose "Show only on <number of primary monitor>" -> window now is on primary monitor -> get "screen changed" message in output

      3) Choose "Extend these displays" -> window now is on secondary monitor -> got no "screen changed" message in output

       

      Windows 10:

       

      1) Window is opened on primary monitor

      2) Choose "Show only on <number of secondary monitor>" -> window now is on secondary monitor -> get "screen changed" message in output

      3) Choose "Extend these displays" -> window now is on primary monitor -> got no "screen changed" message in output

      Attachments

        1. Снимок экрана 2024-03-05 174742.png
          8 kB
          Daniil Volkov
        2. Clipboard_2024.03.05_17-46-32.png
          17 kB
          Daniil Volkov
        3. Clipboard_2024.03.05_17-31-26.png
          249 kB
          Daniil Volkov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            daniil_ubica Daniil Volkov
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes