mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue