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

Wrong Cursor when widget become native. on X11

    XMLWordPrintable

Details

    • 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba

    Description

      This happens in many application in KDE with Qt 4.6
      I suspect this is because widget becomes more native in Qt 4.6

      The problem seems to be that when widget become native, the cursor of the parent widget is not reset correctly.

      Click on b2 and observe that the cursor of b1 and the parent is wrong

      #include <QtGui>
      
      
      struct O : public QObject
      {Q_OBJECT
      public slots:
          void slotFoo() {
              qDebug() << b2->winId();
          }
      public: 
          QPushButton *b2;
      };
      
      
      int main(int argc, char** argv)
      {
          QApplication a(argc, argv);
      
      
          QWidget w;
          w.setObjectName("toplevel");
          QVBoxLayout *l = new QVBoxLayout(&w);
          w.setLayout(l);
          QPushButton *b1 = new QPushButton("b1", &w);
          b1->setObjectName("b1");
          l->addWidget(b1);
          QPushButton *b2 = new QPushButton("b2", &w);
          l->addWidget(b2);
          b2->setObjectName("b2");
          b2->setCursor(Qt::PointingHandCursor);
      
          O o;
          o.b2 = b2;
          QObject::connect(b2, SIGNAL(clicked()), &o, SLOT(slotFoo()));
      
          w.show();
      
          return a.exec();
      }
      
      #include "main.moc"
      

      Attachments

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

        Activity

          People

            dzyubenk Denis Dzyubenko (Inactive)
            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            Votes:
            10 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes