I am programming a C ++ / qml application. Since I have many qml files, I wanted to create a directory structure. I have already implemented the structure in my file system as follows:
project |- qml |- main.qml |- widgets |- Button.qml |- Label.qml
Now I want to use qrc prefixes to create the same hierarchy:
main.qrc / main.qml /widgets Button.qml Label.qml
This is my qml file example:
import QtQuick 2.2 import "widgets" Item { id: window width: 800 height: 480 Button { id: button anchors.centerIn parent text: "click me" } }
The problem I have is that the compiler does not know Button!
EDIT:
Error message: qrc: ///qml/main.qml: 4 widgets: there is no such directory
source share