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

My program isnt finding qrc:/main.qml



  • QML debugging is enabled. Only use this in a safe environment.
    QQmlApplicationEngine failed to load component
    qrc:/main.qml: No such file or directory
    

    My project is with that structure:
    613c8b30-f3f8-4fc7-916e-6bd34de61cde-image.png
    GUI is called to open a window in Client and HackoranDLL subdirectories, what i am doing wrong?
    EDIT: GUI subdirectory is an static library
    SOLVED!
    If you have a similar problem, just put Q_INIT_RESOURCE(name file without " and without .qrc);
    WARNING: you need to put it outside a namespace, otherwise it will report a LNK error! if you need to put inside a name space, create an function outside of any namespace and call this macro, easy


  • Lifetime Qt Champion

    Hi,

    There's additional steps to do described here.



  • im getting a link error now

    GUI.lib(main.cpp.obj):-1: error: LNK2019: s�mbolo externo n�o resolvido, "int __cdecl gui::qInitResources_qml(void)" (?qInitResources_qml@gui@@YAHXZ), referenciado na fun��o "void __cdecl gui::openWindow(class hackoran::instance *)" (?openWindow@gui@@YAXPEAVinstance@hackoran@@@Z)
    

    any idea?


  • Lifetime Qt Champion

    Not knowing your library code, it's hard to tell.

    Are you using any namespaces ?



  • i already solved it, look at the topic above


  • Lifetime Qt Champion

    Good :-)

    I would suggest for next time to add a message pointing that. Users will likely go through the answers missing your edits.


Log in to reply