mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
qrc: use "MapWidget.qml" as a QRC alias
Apparently, if it's required to import a QML component inside any QML file from resource, the compoment QRC alias has to have the same name as the component - e.g. add QRC alias MapWidgetContextMenu.qml allows creating a MapWidgetContextMenu compoment inside MapWidget.qml. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
b0cf820bef
commit
b7c4a7fbfc
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ MapWidget::MapWidget(QWidget *parent) : QQuickWidget(parent)
|
|||
qmlRegisterType<MapLocationModel>("org.subsurfacedivelog.mobile", 1, 0, "MapLocationModel");
|
||||
qmlRegisterType<MapLocation>("org.subsurfacedivelog.mobile", 1, 0, "MapLocation");
|
||||
|
||||
setSource(QUrl(QStringLiteral("qrc:/mapwidget-qml")));
|
||||
setSource(QUrl(QStringLiteral("qrc:/MapWidget.qml")));
|
||||
setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
|
||||
m_rootItem = qobject_cast<QQuickItem *>(rootObject());
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="mapwidget-qml">mobile-widgets/qml/MapWidget.qml</file>
|
||||
<file alias="MapWidget.qml">mobile-widgets/qml/MapWidget.qml</file>
|
||||
<file alias="mapwidget-marker">mobile-widgets/qml/icons/mapwidget-marker.png</file>
|
||||
<file alias="mapwidget-marker-selected">mobile-widgets/qml/icons/mapwidget-marker-selected.png</file>
|
||||
<file alias="mapwidget-toggle-satellite">mobile-widgets/qml/icons/mapwidget-toggle-satellite.png</file>
|
||||
|
|
Loading…
Reference in a new issue