Use qrc to deploy qml files in declarative-camera examples

Make the declarative-camera example working in shadow builds by including
the Qt Quick assets via a .qrc file.

Change-Id: Iea56e7d69558503abdf15a600a6ce21ea90ee99a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Kai Koehne
2012-12-20 16:51:11 +01:00
committed by The Qt Project
parent d8426bbf71
commit b0b78d200b
3 changed files with 28 additions and 2 deletions

View File

@@ -50,8 +50,7 @@ int main(int argc, char* argv[])
// Qt.quit() called in embedded .qml by default only emits
// quit() signal, so do this (optionally use Qt.exit()).
QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() +
QLatin1String("/declarative-camera.qml")));
view.setSource(QUrl("qrc:///declarative-camera.qml"));
view.resize(800, 480);
view.show();
return app.exec();