Commit 7197e400 authored by Sergey Chupligin's avatar Sergey Chupligin

[examples] Fix start

parent dfe1f0c9
...@@ -38,13 +38,22 @@ ...@@ -38,13 +38,22 @@
** $QT_END_LICENSE$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
#include <QApplication> #include <QtGui/QGuiApplication>
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QtQuick/QQuickView>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
QQmlApplicationEngine engine; QGuiApplication app(argc, argv);
engine.load(QUrl(QStringLiteral("/usr/share/glacier-components/main.qml")));
QQmlApplicationEngine* engine = new QQmlApplicationEngine(QUrl("/usr/share/glacier-components/main.qml"));
QObject *topLevel = engine->rootObjects().value(0);
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
window->setTitle(QObject::tr("Glacier components"));
window->showFullScreen();
return app.exec(); return app.exec();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment