admin管理员组文章数量:1356943
I'm the one trying to make program with Qt for Python. I made a component named "Light.qml". When I import this component and build the project, It works without error. But when I execute the program, It makes error said "Cannot override FINAL property". I think there's no FINAL property in my component "Light". The most thing I can't understand is, when I make Light.qml file empty and execute the program, it still prints same error message. Even though there's nothing in my "Light.qml" file! Is this project refer something other Light.qml file?
QQmlApplicationEngine failed to load component
file:///C:/my/projet/main.qml:93:13: Type Light unavailable
qrc:/devices/Light/Light.qml:4:5: Cannot override FINAL property
At first, the component "Light.qml" has two properties, width and height. I realized these properties can't override, so I removed them. But it still prints error message about FINAL property overriding. Is my component code something wrong?
import QtQuick 2.15
Item {
id: light
property int brightness: 100
property alias img: area_light
Image {
id: area_light
fillMode: Image.PreserveAspectFit
source: "qrc:/images/light.png"
visible: false
}
}
本文标签: qtQML quotCannot override FINAL propertyquot issueStack Overflow
版权声明:本文标题:qt - QML "Cannot override FINAL property" issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744059734a2583906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论