<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

  <channel>

  
  <title>Qt DevNet forums: Qt Quick 1283365070**  </title>
  <link>http://qt-project.org/forums/viewforum/12/</link>
  <description>RSS feed for latest posts in Qt Quick</description>
  <copyright>Copyright 2013 Qt Project</copyright>
  <docs>http://www.rssboard.org/rss-specification</docs>
  <generator>ExpressionEngine v2.3.1 http://expressionengine.com/</generator>
  <lastBuildDate>Wed, 01 Sep 2010 20:17:50 GMT</lastBuildDate>
  <atom:link href="http://qt-project.org/feeds/all_forums/12" rel="self" type="application/rss+xml" />
  
  
  
        <item>
            <title>QML designer is very slow</title>
            <link>http://qt-project.org/forums/viewthread/28017</link>
            <author>Kokman</author>
            <description><![CDATA[My machine is MacBookPro retina 15&#8221;. When I switch to designer on QML file, QT Creator hangs out.  How to avoid this problem?

	Thanks!]]></description>
            <guid isPermaLink="false">381a787e55c9b7c3c1c621a1f98a5daf</guid>
            <pubDate>Tue, 21 May 2013 22:04:23 GMT</pubDate>
        </item>
  
        <item>
            <title>Load shared library with QML files in resource file</title>
            <link>http://qt-project.org/forums/viewthread/28015</link>
            <author>feldifux</author>
            <description><![CDATA[Hi,
I have the following use&#45;case:

	I want to protect the QML code of a dynamic library and thus add the QML files to a qrc file. The library is created by compiling the resource file into the library which is a QDeclarativeExtensionPlugin, so it is also possible to mix C++ code and QML code in the library.

	From my application, I then load the library by importing the plugin. In order the QML components are found, I also added the qmldir file into the qrc file of the library.

	If i import the plugin now from the application, it only works if a QML component of the library is not created in the main.qml file. When I load it dynamically either with Qt.createComponent() or the Loader element it works fine, but if the component is in the main.qml file the error output is

	file::/qml/PluginApplication/main.qml: TestItem is not a type


	So to clarify, here is an overview what works and what not:
// main.qml:
&amp;nbsp;
import QtQuick 1.1
import MyPlugin 1.0
&amp;nbsp;
Item &#123;
&amp;nbsp; id: window
&amp;nbsp;
&amp;nbsp; // does NOT work, TestItem is a QML component in the dynamic library
&amp;nbsp; TestItem &#123;&#125;
&amp;nbsp;
&amp;nbsp; Component.onCompleted: &#123;
&amp;nbsp; &amp;nbsp; // this works
&amp;nbsp; &amp;nbsp; var comp = Qt.createComponent&#40;&amp;quot;qrc:/plugins/MyPlugin/TestItem.qml&amp;quot;&#41;
&amp;nbsp; &amp;nbsp; var obj = comp.createObject&#40;window&#41;
&amp;nbsp; &#125;
&amp;nbsp;
&amp;nbsp; // this also works
&amp;nbsp; Loader &#123;
&amp;nbsp; &amp;nbsp; id: loader
&amp;nbsp; &amp;nbsp; x: 100
&amp;nbsp; &amp;nbsp; y: 100
&amp;nbsp; &#125;
&amp;nbsp; MouseArea &#123;
&amp;nbsp; &amp;nbsp; anchors.fill: parent
&amp;nbsp; &amp;nbsp; onClicked: &#123;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // the DynamicallyLoadedTestItem.qml contains a TestItem as its root element
&amp;nbsp; &amp;nbsp; &amp;nbsp; loader.source = &amp;quot;DynamicallyLoadedTestItem.qml&amp;quot;
&amp;nbsp; &amp;nbsp; &#125;
&amp;nbsp; &#125;
&#125;


	It looks like the dynamic library is not loaded when qmlViewer.setMainQmlFile(&#41; is called, although the import works as the later creation of TestItem works. From what I&#8217;ve read in the docs, the Q_INIT_RESOURCE_EXTERN(&#41; macro should be used when dynamic libraries are used which contain resource files. However, it has no effect.

	Similar threads like this one [qt&#45;project.org] also did not solve the problem.

	Any ideas how to properly initialize the plugin?]]></description>
            <guid isPermaLink="false">96efc5364c0c553f815fbe51f685bac4</guid>
            <pubDate>Tue, 21 May 2013 20:56:28 GMT</pubDate>
        </item>
  
        <item>
            <title>[Solved] Error using states to change between pages</title>
            <link>http://qt-project.org/forums/viewreply/126185</link>
            <author>john_god</author>
            <description><![CDATA[Hi oosavu
You are right I&#8217;m overcomplicating things. Using:

	onGameclick: root.state = &amp;quot;game&amp;quot;


	and in main.qml:

	PagePanel &#123;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id: pagepanel
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; state: &amp;quot;menu&amp;quot;
&amp;nbsp; &amp;nbsp; &#125;


	works fine. 
Thank you]]></description>
            <guid isPermaLink="false">022d40aba4d8a653ab8084102e58f288</guid>
            <pubDate>Tue, 21 May 2013 12:49:36 GMT</pubDate>
        </item>
  
        <item>
            <title>[solved] Relative URL when creating a reusable QML PageLoader component</title>
            <link>http://qt-project.org/forums/viewreply/126162</link>
            <author>prismatic</author>
            <description><![CDATA[Okay, &#8220;Qt.resolvedUrl()&#8221; &#8230; pretty simple :)
All that time reading about import paths and it was right here all along
http://qt&#45;project.org/doc/qt&#45;5.0/qtqml/qml&#45;url.html]]></description>
            <guid isPermaLink="false">94d2bf2948937c4a7e4d173ffd625494</guid>
            <pubDate>Tue, 21 May 2013 11:14:39 GMT</pubDate>
        </item>
  
        <item>
            <title>How to use Qt commercial chart</title>
            <link>http://qt-project.org/forums/viewreply/126158</link>
            <author>AndyS</author>
            <description><![CDATA[Assuming you have posted a request via the link that JKSH has provided then we should have seen this appear in our system and depending on when you submitted it then it should have been answered. If you contact me directly on andy DOT shaw AT digia DOT com with the details of the request (i.e. your name, license id and the subject you used for the request) then I can try and track it down for you.

	We do answer everything within 2 working days, so either it is already answered and I&#8217;m just seeing this late, or something has gone awry in our system for some reason.]]></description>
            <guid isPermaLink="false">7943f9b7425a9b7d654527a8e6eca8ee</guid>
            <pubDate>Tue, 21 May 2013 11:06:30 GMT</pubDate>
        </item>
  
        <item>
            <title>[solved] Relative URL when creating a reusable QML PageLoader component</title>
            <link>http://qt-project.org/forums/viewthread/27994</link>
            <author>prismatic</author>
            <description><![CDATA[Hiya,

	I&#8217;m trying to create a PageLoader component for QML. So say I defined a PageLoader.qml file and it has something like the following in it:
Item
&#123; &amp;nbsp; 
&amp;nbsp; &amp;nbsp;property var pageStack: &#91;&#93;;
&amp;nbsp; &amp;nbsp;function push&#40;page_url&#41; &#123;&#125;
&amp;nbsp; &amp;nbsp;function pop&#40;&#41; &#123;&#125;
&amp;nbsp;
&amp;nbsp; &amp;nbsp;Loader &amp;nbsp; &#123;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // do stuff here later
&amp;nbsp; &amp;nbsp;&#125;
&#125;


	PageLoader is located along side a bunch of reusable components in /stuff/UIComponents/. A project that&#8217;s going to use UIComponents is located in /stuff/project/main.qml. In main.qml I call import:

	import QtQuick 2.0
import &amp;quot;../UIComponents&amp;quot;
&amp;nbsp;
Rectangle &amp;nbsp; &#123;
&amp;nbsp; &amp;nbsp;PageLoader &amp;nbsp; &#123; id:pageloader; &#125;
&amp;nbsp; &amp;nbsp;Button &amp;nbsp; &#123; onClicked: pageloader.push&#40;&amp;quot;hello.qml&amp;quot;&#41;; &#125;
&#125;


	And this is where I run into trouble. &#8220;hello.qml&#8221; is intended to be specified relative to &#8220;main.qml&#8221;, because that&#8217;s where PageLoader has been instantiated. However, PageLoader saves &#8220;hello.qml&#8221; into its pageStack property and then changes the source of Loader whenever its ready. Loader treats this as a path relative to the component location (in /stuff/uicomponents) and I get an error like:
/stuff/uicomponents/hello.qml: File not found


	So what am I supposed to do here? How can I pass the right path to my custom component (/stuff/projects/hello.qml) if I want to specify it as a relative path?

	Preet]]></description>
            <guid isPermaLink="false">6cc6df1cff3e8a63e4b5c5066710983a</guid>
            <pubDate>Tue, 21 May 2013 10:33:28 GMT</pubDate>
        </item>
  
        <item>
            <title>How to do graph with QML</title>
            <link>http://qt-project.org/forums/viewreply/126116</link>
            <author>JKSH</author>
            <description><![CDATA[Great example, Chris! I forgot about that.

	You can find a screenshot at http://doc&#45;snapshot.qt&#45;project.org/qt5&#45;stable/qtquick/demos&#45;stocqt.html . The chart code is in StockChart.qml]]></description>
            <guid isPermaLink="false">f738413a67e2298079f18025ccfa6504</guid>
            <pubDate>Tue, 21 May 2013 03:31:47 GMT</pubDate>
        </item>
  
        <item>
            <title>Images disappearing when using translucent OpenGL background</title>
            <link>http://qt-project.org/forums/viewreply/126115</link>
            <author>chrisadams</author>
            <description><![CDATA[Hi,

	I can&#8217;t remember the bug number now, but ISTR Gunnar mentioning something about this in a bug report.  Ask him on #qt&#45;graphics and I&#8217;m sure he&#8217;ll be able to point you to the bug.

	Cheers,
Chris.]]></description>
            <guid isPermaLink="false">911d3d3813fabbb5b98a9e2d8d352094</guid>
            <pubDate>Tue, 21 May 2013 03:29:08 GMT</pubDate>
        </item>
  
        <item>
            <title>What should I do with QML code ?</title>
            <link>http://qt-project.org/forums/viewreply/126113</link>
            <author>chrisadams</author>
            <description><![CDATA[First, you need to ask questions which are (a) more precise, (b) more detailed, &#169; less vague.
What do you trying to achieve?  What have you tried so far?  What went wrong?  Is there any information you can provide (such as error messages which were returned) which might provide some clue as to what went wrong?

	Second, you need to read the documentation.  The documentation (in particular the Qt Quick Application Developer&#8217;s Guide) contains a lot of information which should be useful to get developers up and running quickly.  I&#8217;m not going to link you to it directly, as I think you should be able to find it on your own with a couple of minutes Googling or searching these forums (as I have posted the link here multiple times), if you find the Qt Project documentation landing page too complex to navigate directly &#8211; as I admit that it can be confusing at first.

	Cheers,
Chris.]]></description>
            <guid isPermaLink="false">238f06b50096dd0953f98553dc84a1fa</guid>
            <pubDate>Tue, 21 May 2013 03:17:55 GMT</pubDate>
        </item>
  
        <item>
            <title>defining constants for use in qml</title>
            <link>http://qt-project.org/forums/viewreply/126111</link>
            <author>chrisadams</author>
            <description><![CDATA[With Qt5/QtQuick2 you can register a QML singleton type whose properties are the constants you require (Q_PROPERTY with CONSTANT flag, and also FINAL to ensure that the v4 engine can optimise).  Such property resolutions should be as cheap as possible (and in the future, even greater optimisation is possible, such as hardcoding the constant at binding compilation time, so that the &#8220;binding&#8221; becomes a simple value initialisation).

	On a different tack &#8211; and I don&#8217;t suggest you do this, because it&#8217;s horrible &#8211; you can always use #define etc etc and manually pass your QML files through the C preprocessor as a build step.  But don&#8217;t do that, because it&#8217;s evil, and you can&#8217;t rely on it working in the future (eg, if the QML syntax is extended for some reason).

	Cheers,
Chris.]]></description>
            <guid isPermaLink="false">f2e4e927807a3a58da41080efd0a0a25</guid>
            <pubDate>Tue, 21 May 2013 03:04:12 GMT</pubDate>
        </item>
  

  </channel>
</rss>