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:
committed by
The Qt Project
parent
d8426bbf71
commit
b0b78d200b
@@ -4,6 +4,7 @@ TARGET=declarative-camera
|
|||||||
QT += quick qml multimedia
|
QT += quick qml multimedia
|
||||||
|
|
||||||
SOURCES += qmlcamera.cpp
|
SOURCES += qmlcamera.cpp
|
||||||
|
RESOURCES += declarative-camera.qrc
|
||||||
|
|
||||||
target.path = $$[QT_INSTALL_EXAMPLES]/multimediawidgets/declarative-camera
|
target.path = $$[QT_INSTALL_EXAMPLES]/multimediawidgets/declarative-camera
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>PhotoPreview.qml</file>
|
||||||
|
<file>ZoomControl.qml</file>
|
||||||
|
<file>VideoCaptureControls.qml</file>
|
||||||
|
<file>VideoPreview.qml</file>
|
||||||
|
<file>FocusButton.qml</file>
|
||||||
|
<file>PhotoCaptureControls.qml</file>
|
||||||
|
<file>declarative-camera.qml</file>
|
||||||
|
<file>CameraPropertyPopup.qml</file>
|
||||||
|
<file>CameraPropertyButton.qml</file>
|
||||||
|
<file>CameraButton.qml</file>
|
||||||
|
<file>images/camera_auto_mode.png</file>
|
||||||
|
<file>images/camera_camera_setting.png</file>
|
||||||
|
<file>images/camera_flash_auto.png</file>
|
||||||
|
<file>images/camera_flash_fill.png</file>
|
||||||
|
<file>images/camera_flash_off.png</file>
|
||||||
|
<file>images/camera_flash_redeye.png</file>
|
||||||
|
<file>images/camera_white_balance_cloudy.png</file>
|
||||||
|
<file>images/camera_white_balance_flourescent.png</file>
|
||||||
|
<file>images/camera_white_balance_incandescent.png</file>
|
||||||
|
<file>images/camera_white_balance_sunny.png</file>
|
||||||
|
<file>images/toolbutton.png</file>
|
||||||
|
<file>images/toolbutton.sci</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -50,8 +50,7 @@ int main(int argc, char* argv[])
|
|||||||
// Qt.quit() called in embedded .qml by default only emits
|
// Qt.quit() called in embedded .qml by default only emits
|
||||||
// quit() signal, so do this (optionally use Qt.exit()).
|
// quit() signal, so do this (optionally use Qt.exit()).
|
||||||
QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
|
QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
|
||||||
view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() +
|
view.setSource(QUrl("qrc:///declarative-camera.qml"));
|
||||||
QLatin1String("/declarative-camera.qml")));
|
|
||||||
view.resize(800, 480);
|
view.resize(800, 480);
|
||||||
view.show();
|
view.show();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|||||||
Reference in New Issue
Block a user