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

[Reg Qt5.9.9 -> Qt5.15] setCursor() does not work on QWidget inside QWidget

    XMLWordPrintable

Details

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

    Description

      When there is a QWidget inside "window" QWidget with zero margins (so internal QWidget covers entire client area of "window" QWidget), setCursor to the internal QWidget has no effect when moving the cursor from outside to inside of the window.

      See Qtbug96003-setCursorProblem.mov

      Simplest reproducible sample code is as below

          ui->setupUi(this);  
          ui->centralwidget->setCursor(Qt::PointingHandCursor);
      

      How to reproduce
      1. Use the attached sample project Qtbug96003.zip
      2. Slide the cursor slowly from outside to inside of the window

      What is known

      • Regression bug between Qt5.9(correct) and Qt5.10(wrong)
      • Doesn't happen on Windows
      • Moving cursor quickly does not show this phenomena
      • If there is no "internal" QWidget, (i.e. this->setCursor(Qt::PointingHandCursor) in above sample) , then everything works fine.

      Attachments

        Issue Links

          Activity

            People

              vestbo Tor Arne Vestbø
              nagrohn Nahomi Gröhn (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: