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

QML/Windows: setting the cursor to QCursor(Qt::BlankCursor) on a secondary display sets it to random pixels

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.8.0, 5.9.0, 5.9.1, 5.10, 5.11, 5.12
    • GUI: Painting
    • None

    Description

      To trigger this bug, you need:

      • multiple displays (the desktop must be extended, not duplicated)
      • different scaling settings for the displays (e.g. 125% for the main display and 100% for the secondary) (Windows Settings --> System --> Display --> Scale and layout)
      • hide the cursor on a display that isn't the main one (The cursor must be visible inside the window before it is hidden to trigger the bug.)
      import QtQuick 2.7
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          visible: true
          width: 600
          height: 600
      
      
          Rectangle {
              width:  500
              height: 500
              color: "red"
      
      
              MouseArea {
                  anchors.fill: parent
                  cursorShape: Qt.BlankCursor
              }
          }
      }
      

       

      This doesn't happen, when the cursor is set to an empty one:

      QBitmap zero_bitmap(32, 32);
      zero_bitmap.clear();
      QGuiApplication::setOverrideCursor(QCursor(zero_bitmap, zero_bitmap));
      

       

      The attached image shows a pattern that appeared, when the cursor was hidden on a red background:

      • black pixels
      • white pixels
      • red pixels (transparent cursor pixels)
      • cyan pixels (XOR'd red background pixels)

       

      Attachments

        1. qt_hidden_cursor_bug_x16.png
          qt_hidden_cursor_bug_x16.png
          2 kB
        2. qtbug61678_diag.diff
          0.8 kB
        3. qtbug61678_log_tobias.txt
          0.5 kB
        4. qtbug61678_log.txt
          0.9 kB
        5. qtbug61678.qml
          0.3 kB
        6. qtbug61678.zip
          2 kB
        7. qtdiag_5.8.0_gcc6.3.0.txt
          6 kB
        8. qtdiag_5.9.1_msvc14.txt
          6 kB
        9. widget_main.cpp
          1.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            tobiasludwig Tobias Ludwig
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes