Hello friends,
when I declare a rectangle in a file:
TestRect.qml
import QtQuick 2.2
Rectangle {
color : "green"
anchors.fill: parent
width: 30
}
import QtQuick 2.2
Rectangle {
color : "green"
anchors.fill: parent
width: 30
}
To copy to clipboard, switch view to plain text mode
and try to use it in main.qml
ApplicationWindow {
id: root
TestRect{
id:myrect
}
}
ApplicationWindow {
id: root
TestRect{
id:myrect
}
}
To copy to clipboard, switch view to plain text mode
Compiler says :
So what is the point here?
Bookmarks