From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- examples/statemachine/eventtransitions/eventtransitions.pro | 5 +++++ examples/statemachine/eventtransitions/main.cpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'examples/statemachine/eventtransitions') diff --git a/examples/statemachine/eventtransitions/eventtransitions.pro b/examples/statemachine/eventtransitions/eventtransitions.pro index 646c90a07d..8b77bb25a1 100644 --- a/examples/statemachine/eventtransitions/eventtransitions.pro +++ b/examples/statemachine/eventtransitions/eventtransitions.pro @@ -5,3 +5,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions INSTALLS += target sources + +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 5391057992..5c0eb8218b 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(); } -- cgit v1.2.3