diff options
Diffstat (limited to 'examples/graphicsview/elasticnodes/main.cpp')
-rw-r--r-- | examples/graphicsview/elasticnodes/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/examples/graphicsview/elasticnodes/main.cpp b/examples/graphicsview/elasticnodes/main.cpp index ab7e7cf..d653da5 100644 --- a/examples/graphicsview/elasticnodes/main.cpp +++ b/examples/graphicsview/elasticnodes/main.cpp @@ -47,7 +47,18 @@ int main(int argc, char **argv) QApplication app(argc, argv); qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); - GraphWidget widget; - widget.show(); + GraphWidget *widget = new GraphWidget; + + QMainWindow mainWindow; + mainWindow.setCentralWidget(widget); + +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + mainWindow.menuBar()->addAction("Shuffle", widget, SLOT(shuffle())); + mainWindow.menuBar()->addAction("Zoom In", widget, SLOT(zoomIn())); + mainWindow.menuBar()->addAction("Zoom Out", widget, SLOT(zoomOut())); + mainWindow.showMaximized(); +#else + mainWindow.show(); +#endif return app.exec(); } |