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

QDeclarativeItem::hasActiveFocus() returns true when item does not have focus

XMLWordPrintable

      When mixing QML and C++, it's possible to clear focus in QGraphicsScene by calling QGraphicsScene::setFocusItem(0). When doing so, QDeclarativeItem::hasActiveFocus() will return true if the declarative item or one of its descendents has (ever) had focus. This is because the function checks if the item has a focusItem(), but not if it actually has focus. QGraphicsItem::hasFocus() works and returns the correct value.

      See also https://bugreports.qt.nokia.com/browse/QTCOMPONENTS-1183

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

            Unassigned Unassigned
            bibr Andreas Aardal Hanssen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes