Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. My program isnt finding qrc:/main.qml
Forum Update on Monday, May 27th 2025

My program isnt finding qrc:/main.qml

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tiagodinis33
    wrote on last edited by tiagodinis33
    #1
    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi,

      There's additional steps to do described here.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T Offline
        T Offline
        tiagodinis33
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Are you using any namespaces ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • T Offline
            T Offline
            tiagodinis33
            wrote on last edited by
            #5

            i already solved it, look at the topic above

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Good :-)

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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved