summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget_p.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
commit731a2f16578ead0f75f2752e757b138376b2f872 (patch)
tree2b6f9746771992f97cbdb5cf5af8f35ac6928b26 /src/gui/graphicsview/qgraphicswidget_p.cpp
parent37475bcc4aef3f08c5917f22c7f0f427e4214b91 (diff)
parentb4c589868f278aa9a58ab9afa727dbf0a9442e22 (diff)
downloadQt-731a2f16578ead0f75f2752e757b138376b2f872.zip
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.gz
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.bz2
Merge remote branch 'mainline/4.7' into 4.7
Conflicts: src/declarative/qml/qdeclarativeengine.cpp tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 6e397b6..50b315a 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -71,14 +71,17 @@ void QGraphicsWidgetPrivate::init(QGraphicsItem *parentItem, Qt::WindowFlags wFl
adjustWindowFlags(&wFlags);
windowFlags = wFlags;
- q->setParentItem(parentItem);
+ if (parentItem)
+ setParentItemHelper(parentItem, 0, 0);
+
q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::DefaultType));
q->setGraphicsItem(q);
resolveLayoutDirection();
q->unsetWindowFrameMargins();
- q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
- q->setFlag(QGraphicsItem::ItemSendsGeometryChanges);
+ flags |= QGraphicsItem::ItemUsesExtendedStyleOption | QGraphicsItem::ItemSendsGeometryChanges;
+ if (windowFlags & Qt::Window)
+ flags |= QGraphicsItem::ItemIsPanel;
}
qreal QGraphicsWidgetPrivate::titleBarHeight(const QStyleOptionTitleBar &options) const