diff options
Diffstat (limited to 'examples/richtext/calendar')
-rw-r--r-- | examples/richtext/calendar/calendar.desktop | 11 | ||||
-rw-r--r-- | examples/richtext/calendar/calendar.pro | 5 | ||||
-rw-r--r-- | examples/richtext/calendar/main.cpp | 6 | ||||
-rw-r--r-- | examples/richtext/calendar/mainwindow.cpp | 7 |
4 files changed, 28 insertions, 1 deletions
diff --git a/examples/richtext/calendar/calendar.desktop b/examples/richtext/calendar/calendar.desktop new file mode 100644 index 0000000..41ba6dd --- /dev/null +++ b/examples/richtext/calendar/calendar.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Calendar +Exec=/opt/usr/bin/calendar +Icon=calendar +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro index efb99b4..6df4376 100644 --- a/examples/richtext/calendar/calendar.pro +++ b/examples/richtext/calendar/calendar.pro @@ -2,6 +2,9 @@ HEADERS = mainwindow.h SOURCES = main.cpp \ mainwindow.cpp +# App cannot be with name "calendar" in Symbian due to same named system component. +symbian: TARGET = calendarapp + # install target.path = $$[QT_INSTALL_EXAMPLES]/richtext/calendar sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendar.pro @@ -9,3 +12,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/calendar INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp index b23e883..9c1141f 100644 --- a/examples/richtext/calendar/main.cpp +++ b/examples/richtext/calendar/main.cpp @@ -46,7 +46,13 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + window.show(); +#else window.resize(640, 256); window.show(); +#endif return app.exec(); } diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp index 5117c03..60d7c51 100644 --- a/examples/richtext/calendar/mainwindow.cpp +++ b/examples/richtext/calendar/mainwindow.cpp @@ -70,7 +70,6 @@ MainWindow::MainWindow() QLabel *fontSizeLabel = new QLabel(tr("Font size:")); QSpinBox *fontSizeSpinBox = new QSpinBox; fontSizeSpinBox->setRange(1, 64); - fontSizeSpinBox->setValue(10); editor = new QTextBrowser; insertCalendar(); @@ -83,6 +82,12 @@ MainWindow::MainWindow() this, SLOT(setFontSize(int))); //! [3] +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) + fontSizeSpinBox->setValue(4); +#else + fontSizeSpinBox->setValue(10); +#endif + //! [4] QHBoxLayout *controlsLayout = new QHBoxLayout; controlsLayout->addWidget(dateLabel); |