forked from qt-creator/qt-creator
Remove references to using visual editors and use the example code from Qt Sensors module. Add instructions for using CMake. Add CMakeLists.txt, AndroidManifest.xml, and Info.plist files. Change-Id: I956379fdf7d39161f571893d56250ec2dd2f5ddd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
20 lines
512 B
C++
20 lines
512 B
C++
#include <QGuiApplication>
|
|
#include <QQmlApplicationEngine>
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QGuiApplication app(argc, argv);
|
|
|
|
QQmlApplicationEngine engine;
|
|
const QUrl url(u"qrc:/accelbubble/main.qml"_qs);
|
|
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
|
&app, [url](QObject *obj, const QUrl &objUrl) {
|
|
if (!obj && url == objUrl)
|
|
QCoreApplication::exit(-1);
|
|
}, Qt::QueuedConnection);
|
|
engine.load(url);
|
|
|
|
return app.exec();
|
|
}
|