Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Question about qrc and file structure



  • I am trying to organize the files and I have some doubts about it.

    I have the following file structure:

    ├── Pip-Boy.pro
    ├── Pip-Boy.pro.user
    ├── README.md
    └── src
        ├── main.cpp
        ├── qml
        │   ├── main.qml
        │   └── PipMainButtonTab.qml
        └── qml.qrc
    
    

    The qml.qrc file is:

    <RCC>
        <qresource prefix="/">
            <file>qml/main.qml</file>
            <file>qml/PipMainButtonTab.qml</file>
        </qresource>
    </RCC>
    

    The only way to get the program works is importing the qml directory in main.qml

    import "qrc:/qml"
    

    Why I have to import the qml directory if main.qml is in this folder?


Log in to reply