I have a basic QML library with a CPP class, a qrc file and a qml file:
CPP file:
qmlRegisterType( QUrl( "qrc:/MyType.qml" ), "LibA", 1, 0, "MyType" );
QRC file:
<RCC>
<qresource prefix="/">
<file>MyType.qml</file>
</qresource>
</RCC>
QML file:
import QtQuick 2.0
Rectangle {
color: 'blue'
width: 50
height: 50
}
When i use it in main.qml works fine but keep saying invalid property name "color" (M16) and its the same for "width" and "height". I know this can stay this way until works, but can be fixed?
Here my main.qml file:
import QtQuick 2.0
import QtQuick.Window 2.0
import LibA 1.0
Window {
visible : true
width: 640
height: 480
title: "Hello World"
MyType {
height: 100
width: 100
color: 'yellow'
}
}
Im using Qt 5.14.2, Thanks in advance, sorry my bad english.
QtQuick 2.12
in the component as you do in other files? – folibis