<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QML files in resources]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I  have the following problem: I created a qml extension plugin, which I install to a certain place on my system (i.e. I put there a <a href="http://libXXX.so" target="_blank" rel="noopener noreferrer nofollow ugc">libXXX.so</a>, a qmldir, and a plugins.qmltypes file). The plugin holds some components written in C++, and some pure qml components.  Since I do not want my qml files to be public, I added them to my resources (using a .qrc file) and compiled them into the plugin. In addition, I added lines like</p>
<p dir="auto">@AnimatedMessageBox  1.0     qrc:///qml/AnimatedMessageBox.qml@</p>
<p dir="auto">to my qmldir-file to make the qml stuff available.</p>
<p dir="auto">In a test QtQuick-application (running in QtCreator) I can import and use all components from the plugin without problems (after setting the importPaths property correctly). Nevertheless, the pure qml components of the plugin are always marked in red ("unknown component") in QtCreator and their properties are not available. For big components, this is really annoying. The C++ components are displayed properly.</p>
<p dir="auto">Any idea how to solve this?</p>
<p dir="auto">Thanks a lot!</p>
<p dir="auto">P.S.: I tried to put the pure qml components into the plugins.qmltypes file, too, but this seems to make no difference. (Holding the mouse pointer over the import statement for the plugin, I get a message "Read typeinfo files successfully" by the way.)</p>
<p dir="auto">P.P.S: I use QtCreator 3.1.0, Qt 5.2.1 on a 64bit Ubuntu 14.04</p>
]]></description><link>https://forum.qt.io/topic/40701/qml-files-in-resources</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 17:59:51 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/40701.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Apr 2014 13:42:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QML files in resources on Mon, 28 Apr 2014 06:59:29 GMT]]></title><description><![CDATA[<p dir="auto">Ah, I did not know that I have to register the .qml files, too. I tried qmlplugindump, but of course this did not work without registering...</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.qt.io/post/225279</link><guid isPermaLink="true">https://forum.qt.io/post/225279</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 28 Apr 2014 06:59:29 GMT</pubDate></item><item><title><![CDATA[Reply to QML files in resources on Fri, 25 Apr 2014 19:16:48 GMT]]></title><description><![CDATA[<p dir="auto">The code model cannot access the .qml file in the resources.</p>
<p dir="auto">The solution is to do the same as Qt does for QtQuick.Controls.<br />
You have to register the .qml files as composite types using qmlRegisterType() and then use qmlplugindump to create a proper plugins.qmltypes file.</p>
]]></description><link>https://forum.qt.io/post/225006</link><guid isPermaLink="true">https://forum.qt.io/post/225006</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 25 Apr 2014 19:16:48 GMT</pubDate></item></channel></rss>