summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/eventtransitions
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/eventtransitions')
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.desktop11
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.pro5
-rw-r--r--examples/statemachine/eventtransitions/main.cpp11
3 files changed, 26 insertions, 1 deletions
diff --git a/examples/statemachine/eventtransitions/eventtransitions.desktop b/examples/statemachine/eventtransitions/eventtransitions.desktop
new file mode 100644
index 0000000000..c1bceb2240
--- /dev/null
+++ b/examples/statemachine/eventtransitions/eventtransitions.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Event Transitions
+Exec=/opt/usr/bin/eventtransitions
+Icon=eventtransitions
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/eventtransitions/eventtransitions.pro b/examples/statemachine/eventtransitions/eventtransitions.pro
index 1cd958ae97..a958ed7819 100644
--- a/examples/statemachine/eventtransitions/eventtransitions.pro
+++ b/examples/statemachine/eventtransitions/eventtransitions.pro
@@ -6,3 +6,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
INSTALLS += target sources
QT += widgets
+
+symbian: 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)
diff --git a/examples/statemachine/eventtransitions/main.cpp b/examples/statemachine/eventtransitions/main.cpp
index 1b84ae020c..291c1d441d 100644
--- a/examples/statemachine/eventtransitions/main.cpp
+++ b/examples/statemachine/eventtransitions/main.cpp
@@ -48,7 +48,12 @@ public:
: QWidget(parent)
{
QPushButton *button = new QPushButton(this);
- button->setGeometry(QRect(100, 100, 100, 100));
+ button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(button);
+ layout->setContentsMargins(80, 80, 80, 80);
+ setLayout(layout);
//! [0]
//! [1]
@@ -103,7 +108,11 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
Window window;
window.resize(300, 300);
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#else
window.show();
+#endif
return app.exec();
}