Am 08.05.2015 um 15:56 schrieb Koehne Kai:
>
>> -----Original Message-----
>> From: Benjamin Zeller [mailto:[email protected]]
>> Sent: Friday, May 08, 2015 1:14 PM
>> To: Koehne Kai; [email protected]
>> Subject: Re: [Qt-creator] QML codecompletion for QML based component
>>
>> Am 08.05.2015 um 12:59 schrieb Koehne Kai:
>>>> -----Original Message-----
>>>> From: Benjamin Zeller [mailto:[email protected]]
>>>> [...]
>>>>> What exactly is your 'Component'? Is it a Qt Quick plugin, a library
>>>>> ... and
>>>> how are the .qml files embedded?
>>>>> Regards
>>>>>
>>>>> Kai
>>>> The Component would be a pure QML based component. No library.
>>>> The QMake just makes sure they are in the import path when installed.
>>> Alright, but does the 'component' implement an import? If so, setting
>> QML_IMPORT_PATH in your .pro file is what you're looking for.
>>> Regards
>>>
>>> Kai
>> Yes it ships a qmldir file if that is what you mean.
>>
>> So it means I have to set the QML_IMPORT_PATH in my application subdir
>> project, or is it enough if I set it in the root level project.
> You should set it in the .pro file of the project that needs the import.
>
> But remember that QML_IMPORT_PATH works similar to e.g. 
> QQmlEngine::addImportPath: It needs to point to the directory that contains 
> the first part of your import as directory. E.g. if you have 
> com.mycompany.Feature as import the import path should specify the directory 
> that contains the 'com' directory.
>
> See also http://doc.qt.io/qt-5/qqmlengine.html#importPathList
>
> Regards
>
> Kai
Thank you , I got it working. It also works by setting the path in the root
project file though.

Regards,

Benjamin
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to