diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-05-05 04:57:26 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-05-05 23:44:28 (GMT) |
commit | 3c4d3a65bbce6b1f9e649412f141ee8890a7b6cd (patch) | |
tree | 801be34e129444e7f7c908b31ef27462637342a2 /src/gui/graphicsview/qgraphicswidget_p.h | |
parent | b7513f4a15ecac1adf54f2abdda6b56c89d6bef4 (diff) | |
download | Qt-3c4d3a65bbce6b1f9e649412f141ee8890a7b6cd.zip Qt-3c4d3a65bbce6b1f9e649412f141ee8890a7b6cd.tar.gz Qt-3c4d3a65bbce6b1f9e649412f141ee8890a7b6cd.tar.bz2 |
QGraphicsWidget was not working properly when ItemSendsPositionChanges is false
The geometry was not properly set because QGraphicsWidget rely on itemChange
to update its own geometry. Now when calling setPos we also ensure that
for a widget the geometry will be up to date. Setting the flag
ItemSendsPositionChanges to false for a given widget will give a small
performance boost.
Reviewed-by:janarve
Reviewed-by:bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h index 2c5b3bf..140bc0e 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.h +++ b/src/gui/graphicsview/qgraphicswidget_p.h @@ -130,6 +130,8 @@ public: void windowFrameHoverLeaveEvent(QGraphicsSceneHoverEvent *event); bool hasDecoration() const; + void setGeometryFromSetPos(); + // State inline int attributeToBitIndex(Qt::WidgetAttribute att) const { |