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

[regression] Can't set a cursor on both QApplication and widget level before widget is shown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.0.0 Beta 1
    • Fix Version/s: 5.0.0 Beta 2
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Environment:
      Reproduced on Ubuntu 12.04, 64bit and Win7.
    • Commits:
      74230f126be4d7d6d6a91892ddb91bf050a46396

      Description

      1) Compile and run the example code;
      2) Observe how cursor never changes to Qt::SizeBDiagCursor

      int main( int argc, char ** argv )
      {
          QApplication app(argc, argv);
          app.setOverrideCursor(QCursor(Qt::SizeBDiagCursor));
          QLabel w1;
          w1.setGeometry(300,300,400,400);
          //w1.setCursor(QCursor(Qt::SizeBDiagCursor));
          w1.setText("Test widget");
          w1.show();
      
          return app.exec();
      }
      

      I suppose that during the execution there should be a call to QCursor *QGuiApplication::overrideCursor() function to retrieve the current cursor, but it never gets called.

        Attachments

        1. wip_cursor_start.patch
          1 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            e0348803 Miikka Heikkinen
            Reporter:
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes