Cannot assign to non-existent property "..."
-
I am creating a QML file to manage an activity. In another QML file I have declare the QML, not much at the moment, just a placeholder:
HeadingGauge.qml:
item { id: root ... staleMgmt { id: staleHdg } }
The location of both files is the same. When I make the project I see:
HeadingGauge.qml:63:3: Cannot assign to non-existent property `staleMgmt`
What do I need to do?
The same folder contains both:
HeadingGauge.qml staleMgmt.qml
-
staleMgmt - Trying making 's' capital. Component name need to be capital - StaleMgmt. Could this issue.
-
@dheerendra , thank you, now the error is different:
HeadingGauge.qml:63:3: StaleMgmt is not a type StaleMgmt {
Content of StaleMgmt.qml so far:
import QtQml 2.1 import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 import QtQuick.Extras 1.4 Item { id: root property var lastValue; property var resolution; property var showIcon: true; property var timeOfLastChange; Connections { function onSetValue(value) { } } Image { visible: showIcon anchors.fill: iconFill source: "./Items/stale.svg" z: 99 } }
-
@SPlatten said in Cannot assign to non-existent property "...":
import QtQml 2.1
import QtQuick 2.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3
import QtQuick.Extras 1.4Which Qt version is it? Is the qml included in qrc file?
-
@SPlatten Try to change the version numbers to 1.15 or 2.15 if possible. Some can not be changed. If not, you will see build errors.
import QtQml 2.1
import QtQuick 2.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3
import QtQuick.Extras 1.4 -
The import versions have nothing to do with it.
Are you using QRC to embed your .qml files? Do both file are included in the QRC? At the same path?
-
This post is deleted!