...and do not call it show(), because that is the signature of
a non-virtual base class function. showExpanded() sucks as name,
and hjk, who reviewed this is not convinced.
But showExpanded() is still better than show().
Task-Number: QTCREATORBUG-2979
Reviewed-By: hjk
MainWindow mainWindow;
mainWindow.setOrientation(MainWindow::ScreenOrientationAuto); // ORIENTATION
+ mainWindow.showExpanded();
-#ifdef Q_OS_SYMBIAN
- mainWindow.showFullScreen();
-#elif defined(Q_WS_MAEMO_5)
- mainWindow.showMaximized();
-#else
- mainWindow.show();
-#endif
return app.exec();
}
Q_UNUSED(orientation);
#endif // Q_OS_SYMBIAN
}
+
+void MainWindow::showExpanded()
+{
+#ifdef Q_OS_SYMBIAN
+ showFullScreen();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ showMaximized();
+#else
+ show();
+#endif
+}
virtual ~MainWindow();
void setOrientation(ScreenOrientation orientation);
+ void showExpanded();
private:
Ui::MainWindow *ui;
#endif // Q_OS_SYMBIAN
}
-void QmlApplicationViewer::show()
+void QmlApplicationViewer::showExpanded()
{
#ifdef Q_OS_SYMBIAN
showFullScreen();
#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
showMaximized();
#else
- QDeclarativeView::show();
+ show();
#endif
}
void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
void setOrientation(ScreenOrientation orientation);
- void show();
+ void showExpanded();
private:
class QmlApplicationViewerPrivate *m_d;