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

QGraphicsItem.setFocus does not work if its scene has no focus

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.8.4, 5.4.0 Alpha
    • Widgets: GraphicsView
    • None
    • Kubuntu, 4:4.8.4+dfsg-0ubuntu14~ubuntu13.04~ppa1

      I am calling setFocus on a QGraphicsItem while its scene does not have focus. If the scene gets focus, it sets focus not on my wanted item but on the item which had focus when the scene lost focus.

      This happens in my pyqt project, so no C++ example.
      But if you grep for passiveFocusItem in the qt source it should be clear what happens: passiveFocusItem is set when scene loses focus. Next I do setFocus on the item which does not change passiveFocusItem. When scene regains focus, passiveFocusItem is used.

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

            Unassigned Unassigned
            wrohdewald Wolfgang Rohdewald
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes