diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-02-08 15:25:24 +0100 |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2010-02-08 15:25:24 +0100 |
commit | 63c324846ca79c247be13b8561a043887b6741d3 (patch) | |
tree | 001fb5c7d6216434f79f35f05c1b6aad89357154 | |
parent | 1bddf1bc1eb21ff484853997f46ae023e4a4d734 (diff) |
-rw-r--r-- | openglscene.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openglscene.cpp b/openglscene.cpp index 75687c8..25baf72 100644 --- a/openglscene.cpp +++ b/openglscene.cpp @@ -66,9 +66,13 @@ OpenGLScene::OpenGLScene() instructions->layout()->addWidget(new QLabel(tr("Use mouse wheel to zoom model, and click and drag to rotate model"))); instructions->layout()->addWidget(new QLabel(tr("Move the sun around to change the light position"))); - addWidget(instructions); - addWidget(controls); - addWidget(statistics); + QWidget *widgets[] = { instructions, controls, statistics }; + + for (uint i = 0; i < sizeof(widgets) / sizeof(*widgets); ++i) { + QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(0, Qt::Dialog); + proxy->setWidget(widgets[i]); + addItem(proxy); + } QPointF pos(10, 10); foreach (QGraphicsItem *item, items()) { |