//! [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]
