diff options
Diffstat (limited to 'src/labs/platform/doc/src/includes/widgets.qdocinc')
-rw-r--r-- | src/labs/platform/doc/src/includes/widgets.qdocinc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/labs/platform/doc/src/includes/widgets.qdocinc b/src/labs/platform/doc/src/includes/widgets.qdocinc new file mode 100644 index 0000000000..44ebba6de6 --- /dev/null +++ b/src/labs/platform/doc/src/includes/widgets.qdocinc @@ -0,0 +1,28 @@ +//! [1] +The Qt Labs Platform module uses Qt Widgets as a fallback on platforms that +do not have a native implementation available. Therefore, applications that +use types from the Qt Labs Platform module should link to QtWidgets and use +\l QApplication instead of \l QGuiApplication. + +To link against the QtWidgets library, add the following to your qmake project +file: + +\code +QT += widgets +\endcode + +Create an instance of \l QApplication in \c main(): + +\code +#include <QApplication> +#include <QQmlApplicationEngine> + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + return app.exec(); +} +\endcode +//! [1] |