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

The cursor gets reset for QGraphicsItem when releasing the mouse

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.0
    • Widgets: GraphicsView
    • None
    • ad0c6b17cde4a3ce0041d1a54b96ccb5a6792520

    Description

      When setting a custom cursor for a QGraphicsItem and then clicking or dragging the item, then when releasing the mouse, the cursor turns into an arrow again.

      The attached example demonstrates this issue.

      When uncommenting the PushButton/ProxyWidget code in the example and following these steps:

      1) Choosing a custom cursor and hovering over the proxy
      2) Choosing another cursor, clicking or dragging the item and then releasing the mouse

      -> the cursor turns into the custom cursor it had when hovering over the proxy widget. So when releasing the mouse, the QGraphicsView's cursor reverts to the previous cursor it had.

      Attachments

        1. main.cpp
          0.2 kB
        2. cursortest.h
          0.5 kB
        3. cursortest.cpp
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ylopes Yoann Lopes
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes