Adapt examples to AUTO_RESOURCE_PREFIX
Examples that don't explicitly set NO_RESOURCE_TARGET_PATH get the AUTO_RESOURCE_PREFIX now. Task-number: QTBUG-103452 Change-Id: I6b41e96ce5620079f60ca2f967b0a2e611c1f738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
This commit is contained in:
parent
12b0581a79
commit
d270c51f81
|
@ -24,6 +24,7 @@ target_link_libraries(dynamicsceneexample PUBLIC
|
|||
qt_add_qml_module(dynamicsceneexample
|
||||
URI dynamicscene
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"GenericSceneItem.qml"
|
||||
"PaletteItem.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dynamicscene">
|
||||
<qresource prefix="/qt/qml/dynamicscene">
|
||||
<file>dynamicscene.qml</file>
|
||||
<file>images/face-smile.png</file>
|
||||
<file>images/moon.png</file>
|
||||
|
|
|
@ -35,6 +35,7 @@ qt_add_qml_module(qmlqtimeexample
|
|||
VERSION 1.0
|
||||
URI "TimeExample"
|
||||
SOURCES timemodel.cpp timemodel.h
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES ${qml_files}
|
||||
RESOURCES ${images}
|
||||
)
|
||||
|
|
|
@ -20,6 +20,7 @@ qt_add_executable(xmlhttprequestexample
|
|||
qt_add_qml_module(xmlhttprequestexample
|
||||
URI xmlhttprequest
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"methods.js"
|
||||
"xmlhttprequest.qml"
|
||||
|
|
|
@ -17,7 +17,7 @@ int main(int argc, char *argv[])
|
|||
qputenv("QML_XHR_ALLOW_FILE_READ", QByteArray("1"));
|
||||
|
||||
view.connect(view.engine(), &QQmlEngine::quit, &app, &QCoreApplication::quit);
|
||||
view.setSource(QUrl("qrc:///xmlhttprequest/xmlhttprequest.qml"));
|
||||
view.setSource(QUrl("qrc:/qt/qml/xmlhttprequest/xmlhttprequest.qml"));
|
||||
if (view.status() == QQuickView::Error)
|
||||
return -1;
|
||||
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/xmlhttprequest">
|
||||
<qresource prefix="/qt/qml/xmlhttprequest">
|
||||
<file>xmlhttprequest.qml</file>
|
||||
<file>methods.js</file>
|
||||
<file>data.xml</file>
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(animationexample animation_shared)
|
|||
qt_add_qml_module(animationexample
|
||||
URI animation
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"animation.qml"
|
||||
"basics/animators.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/animation">
|
||||
<qresource prefix="/qt/qml/animation">
|
||||
<file>animation.qml</file>
|
||||
<file>basics/images/face-smile.png</file>
|
||||
<file>basics/images/moon.png</file>
|
||||
|
|
|
@ -32,6 +32,7 @@ target_link_libraries(canvasexample PUBLIC
|
|||
qt_add_qml_module(canvasexample
|
||||
URI canvas
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"LabeledSlider.qml"
|
||||
"bezierCurve/bezierCurve.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/canvas">
|
||||
<qresource prefix="/qt/qml/canvas">
|
||||
<file>canvas.qml</file>
|
||||
<file>LabeledSlider.qml</file>
|
||||
<file>bezierCurve/bezierCurve.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ target_link_libraries(dialcontrolexample PUBLIC
|
|||
qt_add_qml_module(dialcontrolexample
|
||||
URI dialcontrol
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"Dial.qml"
|
||||
"QuitButton.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dialcontrol">
|
||||
<qresource prefix="/qt/qml/dialcontrol">
|
||||
<file>Dial.qml</file>
|
||||
<file>QuitButton.qml</file>
|
||||
<file>background.png</file>
|
||||
|
|
|
@ -28,6 +28,7 @@ target_link_libraries(flipableexample PUBLIC
|
|||
qt_add_qml_module(flipableexample
|
||||
URI flipable
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"flipable.qml"
|
||||
"Card.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/flipable">
|
||||
<qresource prefix="/qt/qml/flipable">
|
||||
<file>flipable.qml</file>
|
||||
<file>5_heart.png</file>
|
||||
<file>9_club.png</file>
|
||||
|
|
|
@ -19,6 +19,7 @@ qt_add_executable(painteditemexample WIN32 MACOSX_BUNDLE main.cpp)
|
|||
qt_add_qml_module(painteditemexample
|
||||
URI painteditem
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"textballoons.qml"
|
||||
)
|
||||
|
|
|
@ -8,6 +8,7 @@ qt_add_qml_module(qmltextballoon
|
|||
VERSION 1.0
|
||||
URI "TextBalloon"
|
||||
PLUGIN_TARGET qmltextballoon
|
||||
AUTO_RESOURCE_PREFIX
|
||||
SOURCES
|
||||
textballoon.cpp textballoon.h
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/painteditem">
|
||||
<qresource prefix="/qt/qml/painteditem">
|
||||
<file>textballoons.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -27,6 +27,7 @@ add_dependencies(delegatechooserexample delegatechooser_shared)
|
|||
qt_add_qml_module(delegatechooserexample
|
||||
URI delegatechooser
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"delegatechooser.qml"
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/delegatechooser">
|
||||
<qresource prefix="/qt/qml/delegatechooser">
|
||||
<file>delegatechooser.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -22,6 +22,7 @@ qt_add_executable(draganddropexample
|
|||
qt_add_qml_module(draganddropexample
|
||||
URI draganddrop
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"draganddrop.qml"
|
||||
"tiles/DragTile.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/draganddrop">
|
||||
<qresource prefix="/qt/qml/draganddrop">
|
||||
<file>draganddrop.qml</file>
|
||||
<file>tiles/DragTile.qml</file>
|
||||
<file>tiles/DropTile.qml</file>
|
||||
|
|
|
@ -26,6 +26,7 @@ target_link_libraries(embeddedinwidgetsexample PRIVATE
|
|||
qt_add_qml_module(embeddedinwidgetsexample
|
||||
URI embeddedinwidgets
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"main.qml"
|
||||
RESOURCES
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/embeddedinwidgets">
|
||||
<qresource prefix="/qt/qml/embeddedinwidgets">
|
||||
<file>main.qml</file>
|
||||
<file>reflect.frag.qsb</file>
|
||||
</qresource>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(externaldraganddropexample PROPERTIES
|
|||
qt_add_qml_module(externaldraganddropexample
|
||||
URI externaldraganddrop
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"DragAndDropTextItem.qml"
|
||||
"externaldraganddrop.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/externaldraganddrop">
|
||||
<qresource prefix="/qt/qml/externaldraganddrop">
|
||||
<file>externaldraganddrop.qml</file>
|
||||
<file>DragAndDropTextItem.qml</file>
|
||||
</qresource>
|
||||
|
|
|
@ -29,6 +29,7 @@ target_link_libraries(imageelementsexample PUBLIC
|
|||
qt_add_qml_module(imageelementsexample
|
||||
URI imageelements
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"animatedimage.qml"
|
||||
"animatedsprite.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/imageelements">
|
||||
<qresource prefix="/qt/qml/imageelements">
|
||||
<file>animatedimage.qml</file>
|
||||
<file>animatedsprite.qml</file>
|
||||
<file>borderimage.qml</file>
|
||||
|
|
|
@ -15,6 +15,7 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
|
|||
qt6_add_qml_module(qmlimageproviderplugin
|
||||
VERSION 1.0
|
||||
URI "ImageProviderCore"
|
||||
AUTO_RESOURCE_PREFIX
|
||||
PLUGIN_TARGET qmlimageproviderplugin
|
||||
NO_PLUGIN_OPTIONAL
|
||||
NO_GENERATE_PLUGIN_SOURCE
|
||||
|
|
|
@ -15,6 +15,7 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
|
|||
qt6_add_qml_module(qmlimageresponseproviderplugin
|
||||
VERSION 1.0
|
||||
URI "ImageResponseProviderCore"
|
||||
AUTO_RESOURCE_PREFIX
|
||||
PLUGIN_TARGET qmlimageresponseproviderplugin
|
||||
NO_PLUGIN_OPTIONAL
|
||||
NO_GENERATE_PLUGIN_SOURCE
|
||||
|
|
|
@ -26,6 +26,7 @@ target_link_libraries(keyinteractionexample PRIVATE
|
|||
qt_add_qml_module(keyinteractionexample
|
||||
URI keyinteraction
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"ContextMenu.qml"
|
||||
"GridMenu.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/keyinteraction">
|
||||
<qresource prefix="/qt/qml/keyinteraction">
|
||||
<file>keyinteraction.qml</file>
|
||||
<file>focus.qml</file>
|
||||
<file>ContextMenu.qml</file>
|
||||
|
|
|
@ -20,6 +20,7 @@ qt_add_executable(layoutsexample
|
|||
qt_add_qml_module(layoutsexample
|
||||
URI layouts
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"layouts.qml"
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/layouts">
|
||||
<qresource prefix="/qt/qml/layouts">
|
||||
<file>layouts.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -20,6 +20,7 @@ qt_add_executable(localstorageexample
|
|||
qt_add_qml_module(localstorageexample
|
||||
URI localstorage
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"Database.js"
|
||||
"Header.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/localstorage">
|
||||
<qresource prefix="/qt/qml/localstorage">
|
||||
<file>Header.qml</file>
|
||||
<file>Database.js</file>
|
||||
<file>MyModel.qml</file>
|
||||
|
|
|
@ -27,6 +27,7 @@ target_link_libraries(abstractitemmodelexample PUBLIC
|
|||
qt_add_qml_module(abstractitemmodelexample
|
||||
URI abstractitemmodel
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"view.qml"
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/abstractitemmodel">
|
||||
<qresource prefix="/qt/qml/abstractitemmodel">
|
||||
<file>view.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -23,7 +23,7 @@ int main(int argc, char ** argv)
|
|||
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
view.setInitialProperties({{"model", QVariant::fromValue(&model)}});
|
||||
//![0]
|
||||
view.setSource(QUrl("qrc:/abstractitemmodel/view.qml"));
|
||||
view.setSource(QUrl("qrc:/qt/qml/abstractitemmodel/view.qml"));
|
||||
view.show();
|
||||
|
||||
return app.exec();
|
||||
|
|
|
@ -27,6 +27,7 @@ target_link_libraries(objectlistmodelexample PUBLIC
|
|||
qt_add_qml_module(objectlistmodelexample
|
||||
URI objectlistmodel
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"view.qml"
|
||||
)
|
||||
|
|
|
@ -50,7 +50,7 @@ int main(int argc, char ** argv)
|
|||
view.setInitialProperties({{ "model", QVariant::fromValue(dataList) }});
|
||||
//![0]
|
||||
|
||||
view.setSource(QUrl("qrc:/objectlistmodel/view.qml"));
|
||||
view.setSource(QUrl("qrc:/qt/qml/objectlistmodel/view.qml"));
|
||||
view.show();
|
||||
|
||||
return app.exec();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/objectlistmodel">
|
||||
<qresource prefix="/qt/qml/objectlistmodel">
|
||||
<file>view.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -26,6 +26,7 @@ target_link_libraries(stringlistmodelexample PUBLIC
|
|||
qt_add_qml_module(stringlistmodelexample
|
||||
URI stringlistmodel
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"view.qml"
|
||||
)
|
||||
|
|
|
@ -32,7 +32,7 @@ int main(int argc, char ** argv)
|
|||
view.setInitialProperties({{ "model", QVariant::fromValue(dataList) }});
|
||||
//![0]
|
||||
|
||||
view.setSource(QUrl("qrc:/stringlistmodel/view.qml"));
|
||||
view.setSource(QUrl("qrc:/qt/qml/stringlistmodel/view.qml"));
|
||||
view.show();
|
||||
|
||||
return app.exec();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/stringlistmodel">
|
||||
<qresource prefix="/qt/qml/stringlistmodel">
|
||||
<file>view.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -26,6 +26,7 @@ target_link_libraries(mouseareaexample PUBLIC
|
|||
qt_add_qml_module(mouseareaexample
|
||||
URI mousearea
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"mousearea-wheel-example.qml"
|
||||
"mousearea.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/mousearea">
|
||||
<qresource prefix="/qt/qml/mousearea">
|
||||
<file>mousearea.qml</file>
|
||||
<file>mousearea-wheel-example.qml</file>
|
||||
</qresource>
|
||||
|
|
|
@ -30,6 +30,7 @@ add_dependencies(affectorsexample affectors_shared)
|
|||
qt_add_qml_module(affectorsexample
|
||||
URI affectors
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"affectors.qml"
|
||||
"GreyButton.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/affectors">
|
||||
<qresource prefix="/qt/qml/affectors">
|
||||
<file>affectors.qml</file>
|
||||
<file>age.qml</file>
|
||||
<file>attractor.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ add_dependencies(emittersexample emitters_shared)
|
|||
qt_add_qml_module(emittersexample
|
||||
URI emitters
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"burstandpulse.qml"
|
||||
"customemitter.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/emitters">
|
||||
<qresource prefix="/qt/qml/emitters">
|
||||
<file>emitters.qml</file>
|
||||
<file>burstandpulse.qml</file>
|
||||
<file>customemitter.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ add_dependencies(imageparticleexample imageparticle_shared)
|
|||
qt_add_qml_module(imageparticleexample
|
||||
URI imageparticle
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"allatonce.qml"
|
||||
"colored.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/imageparticle">
|
||||
<qresource prefix="/qt/qml/imageparticle">
|
||||
<file>imageparticle.qml</file>
|
||||
<file>allatonce.qml</file>
|
||||
<file>colored.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ add_dependencies(itemparticleexample itemparticle_shared)
|
|||
qt_add_qml_module(itemparticleexample
|
||||
URI itemparticle
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"itemparticle.qml"
|
||||
"delegates.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/itemparticle">
|
||||
<qresource prefix="/qt/qml/itemparticle">
|
||||
<file>itemparticle.qml</file>
|
||||
<file>delegates.qml</file>
|
||||
<file>script.js</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ add_dependencies(systemexample system_shared)
|
|||
qt_add_qml_module(systemexample
|
||||
URI system
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"dynamiccomparison.qml"
|
||||
"dynamicemitters.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/system">
|
||||
<qresource prefix="/qt/qml/system">
|
||||
<file>system.qml</file>
|
||||
<file>dynamiccomparison.qml</file>
|
||||
<file>dynamicemitters.qml</file>
|
||||
|
|
|
@ -22,6 +22,7 @@ qt_add_executable(positionersexample
|
|||
qt_add_qml_module(positionersexample
|
||||
URI positioners
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"positioners-attachedproperties.qml"
|
||||
"positioners-transitions.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/positioners">
|
||||
<qresource prefix="/qt/qml/positioners">
|
||||
<file>positioners.qml</file>
|
||||
<file>positioners-attachedproperties.qml</file>
|
||||
<file>positioners-transitions.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ target_link_libraries(quick-accessibility PUBLIC
|
|||
qt_add_qml_module(quick-accessibility
|
||||
URI accessibility
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"accessibility.qml"
|
||||
"Button.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/accessibility">
|
||||
<qresource prefix="/qt/qml/accessibility">
|
||||
<file>accessibility.qml</file>
|
||||
<file>Button.qml</file>
|
||||
<file>Checkbox.qml</file>
|
||||
|
|
|
@ -31,6 +31,7 @@ target_link_libraries(rendercontrol_d3d11example PUBLIC
|
|||
# Resources:
|
||||
qt_add_qml_module(rendercontrol_d3d11example
|
||||
URI rendercontrol
|
||||
AUTO_RESOURCE_PREFIX
|
||||
VERSION 1.0
|
||||
QML_FILES
|
||||
"demo.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/rendercontrol">
|
||||
<qresource prefix="/qt/qml/rendercontrol">
|
||||
<file>demo.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -71,7 +71,8 @@ Window::Window(Engine *engine)
|
|||
m_quickWindow = new QQuickWindow(m_renderControl);
|
||||
|
||||
m_qmlEngine = new QQmlEngine;
|
||||
m_qmlComponent = new QQmlComponent(m_qmlEngine, QUrl(QLatin1String("qrc:/rendercontrol/demo.qml")));
|
||||
m_qmlComponent = new QQmlComponent(
|
||||
m_qmlEngine, QUrl(QLatin1String("qrc:/qt/qtml/rendercontrol/demo.qml")));
|
||||
if (m_qmlComponent->isError()) {
|
||||
for (const QQmlError &error : m_qmlComponent->errors())
|
||||
qWarning() << error.url() << error.line() << error;
|
||||
|
|
|
@ -29,6 +29,7 @@ target_link_libraries(rendercontrol_openglexample PUBLIC
|
|||
qt_add_qml_module(rendercontrol_openglexample
|
||||
URI rendercontrol
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"demo.qml"
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/rendercontrol">
|
||||
<qresource prefix="/qt/qml/rendercontrol">
|
||||
<file>demo.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -241,7 +241,7 @@ void WindowSingleThreaded::exposeEvent(QExposeEvent *)
|
|||
if (isExposed()) {
|
||||
if (!m_quickInitialized) {
|
||||
m_cubeRenderer->render(this, m_context, m_quickReady ? m_textureId : 0);
|
||||
startQuick(QStringLiteral("qrc:/rendercontrol/demo.qml"));
|
||||
startQuick(QStringLiteral("qrc:/qt/qml/rendercontrol/demo.qml"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ qt_add_executable(righttoleftexample
|
|||
qt_add_qml_module(righttoleftexample
|
||||
URI righttoleft
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"layoutdirection/layoutdirection.qml"
|
||||
"layoutmirroring/layoutmirroring.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/righttoleft">
|
||||
<qresource prefix="/qt/qml/righttoleft">
|
||||
<file>righttoleft.qml</file>
|
||||
<file>layoutdirection/layoutdirection.qml</file>
|
||||
<file>layoutmirroring/layoutmirroring.qml</file>
|
||||
|
|
|
@ -30,6 +30,7 @@ target_link_libraries(shadereffectsexample PUBLIC
|
|||
qt_add_qml_module(shadereffectsexample
|
||||
URI shadereffects
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"shadereffects.qml"
|
||||
RESOURCES
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/shadereffects">
|
||||
<qresource prefix="/qt/qml/shadereffects">
|
||||
<file>shadereffects.qml</file>
|
||||
<file>content/face-smile.png</file>
|
||||
<file>content/qt-logo.png</file>
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(shapesexample shapes_shared)
|
|||
qt_add_qml_module(shapesexample
|
||||
URI shapes
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"clippedtigers.qml"
|
||||
"interactive.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/shapes">
|
||||
<qresource prefix="/qt/qml/shapes">
|
||||
<file>main.qml</file>
|
||||
<file>shapegallery.qml</file>
|
||||
<file>interactive.qml</file>
|
||||
|
|
|
@ -13,6 +13,7 @@ qt_add_qml_module(${PROJECT_NAME}_shared
|
|||
URI shared
|
||||
VERSION 2.2
|
||||
PLUGIN_TARGET ${PROJECT_NAME}_shared
|
||||
AUTO_RESOURCE_PREFIX
|
||||
SOURCES
|
||||
"shared.h"
|
||||
QML_FILES
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
app.setApplicationName(QFileInfo(app.applicationFilePath()).baseName());\
|
||||
QQuickView view;\
|
||||
ADD_MACOS_BUNDLE_IMPORT_PATH\
|
||||
view.engine()->addImportPath(QStringLiteral(":/"));\
|
||||
if (qEnvironmentVariableIntValue("QT_QUICK_CORE_PROFILE")) {\
|
||||
QSurfaceFormat f = view.format();\
|
||||
f.setProfile(QSurfaceFormat::CoreProfile);\
|
||||
|
@ -35,7 +34,7 @@
|
|||
}\
|
||||
view.connect(view.engine(), &QQmlEngine::quit, &app, &QCoreApplication::quit);\
|
||||
new QQmlFileSelector(view.engine(), &view);\
|
||||
view.setSource(QUrl("qrc:///" #NAME ".qml")); \
|
||||
view.setSource(QUrl("qrc:/qt/qml/" #NAME ".qml")); \
|
||||
if (view.status() == QQuickView::Error)\
|
||||
return -1;\
|
||||
view.setResizeMode(QQuickView::SizeRootObjectToView);\
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(textexample text_shared)
|
|||
qt_add_qml_module(textexample
|
||||
URI text
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"fonts/availableFonts.qml"
|
||||
"fonts/banner.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/text">
|
||||
<qresource prefix="/qt/qml/text">
|
||||
<file>text.qml</file>
|
||||
<file>fonts/availableFonts.qml</file>
|
||||
<file>fonts/banner.qml</file>
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(threadingexample threading_shared)
|
|||
qt_add_qml_module(threadingexample
|
||||
URI threading
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"threadedlistmodel/dataloader.mjs"
|
||||
"threadedlistmodel/timedisplay.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/threading">
|
||||
<qresource prefix="/qt/qml/threading">
|
||||
<file>threading.qml</file>
|
||||
<file>threadedlistmodel/timedisplay.qml</file>
|
||||
<file>threadedlistmodel/dataloader.mjs</file>
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(touchinteractionexample touchinteraction_shared)
|
|||
qt_add_qml_module(touchinteractionexample
|
||||
URI touchinteraction
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"flickable/Panel.qml"
|
||||
"flickable/basic-flickable.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/touchinteraction">
|
||||
<qresource prefix="/qt/qml/touchinteraction">
|
||||
<file>touchinteraction.qml</file>
|
||||
<file>flickable/basic-flickable.qml</file>
|
||||
<file>flickable/corkboards.qml</file>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(dynamicview1 PROPERTIES
|
|||
qt_add_qml_module(dynamicview1
|
||||
URI dynamicview
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
dynamicview.qml
|
||||
PetsModel.qml
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dynamicview">
|
||||
<qresource prefix="/qt/qml/dynamicview">
|
||||
<file>dynamicview.qml</file>
|
||||
<file>PetsModel.qml</file>
|
||||
</qresource>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(dynamicview2 PROPERTIES
|
|||
qt_add_qml_module(dynamicview2
|
||||
URI dynamicview
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
dynamicview.qml
|
||||
PetsModel.qml
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dynamicview">
|
||||
<qresource prefix="/qt/qml/dynamicview">
|
||||
<file>dynamicview.qml</file>
|
||||
<file>PetsModel.qml</file>
|
||||
</qresource>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(dynamicview3 PROPERTIES
|
|||
qt_add_qml_module(dynamicview3
|
||||
URI dynamicview
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
dynamicview.qml
|
||||
PetsModel.qml
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dynamicview">
|
||||
<qresource prefix="/qt/qml/dynamicview">
|
||||
<file>dynamicview.qml</file>
|
||||
<file>PetsModel.qml</file>
|
||||
</qresource>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(dynamicview4 PROPERTIES
|
|||
qt_add_qml_module(dynamicview4
|
||||
URI dynamicview
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
dynamicview.qml
|
||||
ListSelector.qml
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/dynamicview">
|
||||
<qresource prefix="/qt/qml/dynamicview">
|
||||
<file>dynamicview.qml</file>
|
||||
<file>ListSelector.qml</file>
|
||||
<file>PetsModel.qml</file>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(samegame1 PROPERTIES
|
|||
qt_add_qml_module(samegame1
|
||||
URI samegame
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"Block.qml"
|
||||
"Button.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/samegame">
|
||||
<qresource prefix="/qt/qml/samegame">
|
||||
<file>Button.qml</file>
|
||||
<file>Block.qml</file>
|
||||
<file>samegame.qml</file>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(samegame2 PROPERTIES
|
|||
qt_add_qml_module(samegame2
|
||||
URI samegame
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"Block.qml"
|
||||
"Button.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/samegame">
|
||||
<qresource prefix="/qt/qml/samegame">
|
||||
<file>Button.qml</file>
|
||||
<file>Block.qml</file>
|
||||
<file>samegame.qml</file>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(samegame3 PROPERTIES
|
|||
qt_add_qml_module(samegame3
|
||||
URI samegame
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"Block.qml"
|
||||
"Button.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/samegame">
|
||||
<qresource prefix="/qt/qml/samegame">
|
||||
<file>Button.qml</file>
|
||||
<file>Block.qml</file>
|
||||
<file>Dialog.qml</file>
|
||||
|
|
|
@ -23,6 +23,7 @@ set_target_properties(samegame4 PROPERTIES
|
|||
qt_add_qml_module(samegame4
|
||||
URI samegame
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"BoomBlock.qml"
|
||||
"Button.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/samegame">
|
||||
<qresource prefix="/qt/qml/samegame">
|
||||
<file>samegame.qml</file>
|
||||
<file>BoomBlock.qml</file>
|
||||
<file>Button.qml</file>
|
||||
|
|
|
@ -34,6 +34,7 @@ add_dependencies(viewsexample views_shared)
|
|||
qt_add_qml_module(viewsexample
|
||||
URI views
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"delegatemodel/dragselection.qml"
|
||||
"delegatemodel/slideshow.qml"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/views">
|
||||
<qresource prefix="/qt/qml/views">
|
||||
<file>gridview/gridview-example.qml</file>
|
||||
<file>gridview/pics/AddressBook_48.png</file>
|
||||
<file>gridview/pics/AudioPlayer_48.png</file>
|
||||
|
|
|
@ -25,6 +25,7 @@ set_target_properties(windowexample PROPERTIES
|
|||
qt_add_qml_module(windowexample
|
||||
URI window
|
||||
VERSION 1.0
|
||||
AUTO_RESOURCE_PREFIX
|
||||
QML_FILES
|
||||
"AllScreens.qml"
|
||||
"CurrentScreen.qml"
|
||||
|
|
|
@ -14,16 +14,13 @@ int main(int argc, char* argv[])
|
|||
QGuiApplication app(argc, argv);
|
||||
QQmlEngine engine;
|
||||
|
||||
// Add the qrc root as QML import path so that the "shared" module can be found.
|
||||
engine.addImportPath(QStringLiteral(":/"));
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
engine.addImportPath(app.applicationDirPath() + QStringLiteral("/../PlugIns"));
|
||||
#endif
|
||||
|
||||
QQmlComponent component(&engine);
|
||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
||||
component.loadUrl(QUrl("qrc:///window/window.qml"));
|
||||
component.loadUrl(QUrl("qrc:/qt/qml/window/window.qml"));
|
||||
if ( component.isReady() )
|
||||
component.create();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue