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

macOS: Wrong cursor shown when the mouse is moved slowly into window

    XMLWordPrintable

Details

    • macOS
    • ae8e96d4c2fc430ed6f71e422ef4aff2c7f15186 (qt/qtbase/dev) 37b4c2c2c7da0aa8fe67676e49fb92a34e725e92 (qt/qtbase/6.2) 805215bf590ea37c4cb2466a8af7d3391ca94e2d (qt/tqtc-qtbase/5.15)

    Description

      When moving the mouse slowly into the window across the border, the cursor becomes an arrow cursor instead of the set cursor.
      If it is moved into the window through the title bar or really fast across the window border, the set cursor is correctly shown.

      In the example below showing this behaviour, the cursor is set on a widget in a QMainWindow.
      If the cursor is set directly on the QMainWindow and not the central widget, it seems to work as expected.
       

      #include <QApplication>
      #include <QMainWindow>
      #include <QWidget>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QWidget *widget = new QWidget;
          widget->setCursor(QCursor(Qt::CrossCursor));
      
          QMainWindow mainWindow;
          mainWindow.setCentralWidget(widget);
          mainWindow.resize(500, 500);
      
          mainWindow.show();
          return app.exec();
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              christiani Frederik Christiani
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes