Q_INIT_RESOURCE not working

6.5k views Asked by At

Im developing a static library, and I use a qrc file. I read the documentation and found, that I have to call Q_INIT_RESOURCE to make it work, but no success so far.

  • I called Q_INIT_RESOURCE in main, directly after creating the QApplication (I tried different places too, such as directly before accessing it etc.)
  • No namespace
  • The ressource file is added to the Project file of the library
  • The file itself works, if using in a normal Qt Application via resource
  • I used QDirIterator to list all resource, but no matter what I add to the file, it won't appear

I don't now whats going wrong here. If code is requested, I can post some, but except of calling Q_INIT_RESOURCE and creating a QFile with the resource, there is nothing special about it

1

There are 1 answers

2
Felix On BEST ANSWER

I figured it out myself. I'm actually using two libraries, and one used the same name for it's resource file. That won't work. I solved the problem by changing the name of my ressource.