On Wed, Feb 24, 2016 at 10:28 AM, Petr Štětka <[email protected]> wrote: > Hi guys I want do some initialisation before run app, because I must do it > for some library. But I want use QML as in normal Ubuntu Touch app do it. I > want create .click package too. > So how can I do something like this? > > int main(int argc, char *argv[]) > { > QCoreApplication a(argc, argv); > some_initialisation(); > return a.exec(); > }
You will need to instantiate a QQmlApplicationEngine¹ or a QQuickView² in the main function, before calling exec() on your application. There is some documentation on how to write and package a C++/QML app at https://developer.ubuntu.com/en/apps/qml/tutorials/add-cpp-backend-your-qml-app/. HTH, Olivier ¹ https://doc.qt.io/qt-5/qqmlapplicationengine.html ² https://doc.qt.io/qt-5/qquickview.html -- Mailing list: https://launchpad.net/~ubuntu-phone Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-phone More help : https://help.launchpad.net/ListHelp

