Hello,

I have finally arrived at creating a few QML files that provide generic items that I would like to reuse in multiple projects. Ideally, I would like to be able to use these files at development time such that they are recognized in QtCreator, and at runtime. After some time of investigation, I have come to understand that there must be a qmldir file somewhere which points to the QML files.

Heres my questions:
  1. how would QtCreator know at development time where to find the qmldir file?
  2. how would my application at runtime find the file?
  3. is there any way to handle reusable QML witout copying around files?


as far as 1 and 2 goes, my current assumption is that I would have to set the QML_IMPORT_PATH environment variable and copy the files to that location (DONT like that). As far as 3. goes, I have tried to run the command
Qt Code:
  1. rcc -binary mycontrols.qrc -o mycontrols.rcc
To copy to clipboard, switch view to plain text mode 
to create a binary resource, which I then added to my application via
Qt Code:
  1. QResource::registerResource("mycontrols.rcc", p);
To copy to clipboard, switch view to plain text mode 
That obviously didn't work in the IDE, and yielded a "qrc:NavigationPanel": no such directory at runtime from the QML file referenceing the component. So what options do I have?

thanks,
Christian