diff options
Diffstat (limited to 'examples/mainwindows/menus')
-rw-r--r-- | examples/mainwindows/menus/main.cpp | 4 | ||||
-rw-r--r-- | examples/mainwindows/menus/mainwindow.cpp | 6 | ||||
-rw-r--r-- | examples/mainwindows/menus/menus.desktop | 11 | ||||
-rw-r--r-- | examples/mainwindows/menus/menus.pro | 3 |
4 files changed, 24 insertions, 0 deletions
diff --git a/examples/mainwindows/menus/main.cpp b/examples/mainwindows/menus/main.cpp index 01c8ada..dffe803 100644 --- a/examples/mainwindows/menus/main.cpp +++ b/examples/mainwindows/menus/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp index cae81f6..99f1ddc 100644 --- a/examples/mainwindows/menus/mainwindow.cpp +++ b/examples/mainwindows/menus/mainwindow.cpp @@ -53,8 +53,12 @@ MainWindow::MainWindow() QWidget *topFiller = new QWidget; topFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); +#ifdef Q_OS_SYMBIAN + infoLabel = new QLabel(tr("<i>Choose a menu option</i>")); +#else infoLabel = new QLabel(tr("<i>Choose a menu option, or right-click to " "invoke a context menu</i>")); +#endif infoLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); infoLabel->setAlignment(Qt::AlignCenter); @@ -73,8 +77,10 @@ MainWindow::MainWindow() createActions(); createMenus(); +#ifndef Q_OS_SYMBIAN QString message = tr("A context menu is available by right-clicking"); statusBar()->showMessage(message); +#endif setWindowTitle(tr("Menus")); setMinimumSize(160, 160); diff --git a/examples/mainwindows/menus/menus.desktop b/examples/mainwindows/menus/menus.desktop new file mode 100644 index 0000000..dc2bda9 --- /dev/null +++ b/examples/mainwindows/menus/menus.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Menus +Exec=/opt/usr/bin/menus +Icon=menus +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro index 7ca442e..28eed5c 100644 --- a/examples/mainwindows/menus/menus.pro +++ b/examples/mainwindows/menus/menus.pro @@ -12,3 +12,6 @@ symbian { TARGET.UID3 = 0xA000CF66 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example might not fully work on Simulator platform) |