Files
qt-creator/doc/qtcreator/examples/accelbubble/main.cpp
Leena Miettinen d425710587 Doc: Update mobile app tutorial
- Use Qt Quick Application - Empty wizard template to create
  a simpler project
- Use Add New Assets button to add the Bluebubble.svg file to
  the project and QRC
- Use Connections View Properties tab to add custom properties
- Use Properties view and Binding Editor to specify values for
  the custom properties
- Add screenshots

Fixes: QTCREATORBUG-24478
Change-Id: Ic165684141b06dc1870054c8faa2f27f33162c20
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-18 07:03:33 +00:00

21 lines
577 B
C++

#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/main.qml"));
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();
}