Introduce QGraphicsItem::ItemStopsFocusHandling flag
authorMichael Hasselmann <michaelh@openismus.com>
Thu, 10 Feb 2011 18:14:45 +0000 (19:14 +0100)
committerMichael Hasselmann <michaelh@openismus.com>
Tue, 8 Mar 2011 11:21:25 +0000 (12:21 +0100)
commit4874007dc77496b94ff9ffd1668e7ebf0d5e2796
treee8dafa8ee9347ea36d5ecfbb17c377175ffd17c3
parent2e5edf27acc6eb522d4036de9f82896228887d55
Introduce QGraphicsItem::ItemStopsFocusHandling flag

When set for an item, QGraphicsScene will skip focus handling for this item and
everything underneath it (including focus-out). Allows users to reimplement
custom focus handling.

Use case: touch devices that implement panning. Here, focus-in has to happen
only if no panning was triggered. Analogous, no focus-out should happen when
panning was detected.

Fixes the alternative proposal ("black holes for focus changes") of
QTBUG-16343: QGraphicsView doesn't support focus change on mouse release.
src/gui/graphicsview/qgraphicsitem.cpp
src/gui/graphicsview/qgraphicsitem.h
src/gui/graphicsview/qgraphicsitem_p.h
src/gui/graphicsview/qgraphicsscene.cpp