QGV: set QStyleOption::styleObject for graphics items & widgets
authorJ-P Nurmi <jpnurmi@digia.com>
Thu, 29 Nov 2012 22:02:52 +0000 (23:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 30 Nov 2012 18:32:35 +0000 (19:32 +0100)
commitd8fcfbc3c336b76f486ce4fc215076e96ea8090c
tree962e0d052b6997f81d5d73600724c5315fa375f3
parent39058bfe8e41badd9297f6eddd26008f39f9a1d8
QGV: set QStyleOption::styleObject for graphics items & widgets

Certain QStyle code paths expect the style object to be set. This will
avoid problems when QGraphicsItems/Widgets utilize QStyle for drawing.
Even if things will not necessarily animate properly, such legacy code
won't cause a crash at least.

Change-Id: Ic77cb4ee9820d6c4ec92c7278fd87cb866f5a780
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
src/widgets/graphicsview/qgraphicsitem.cpp
src/widgets/graphicsview/qgraphicsscene.cpp
src/widgets/graphicsview/qgraphicswidget.cpp