I'm trying to use Qt Quick Components for Desktop from http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/
I can build and install it just fine into it's own folder, and view the qmls with qmlviewer, but how do I use these qml components from my other projects in Qt Creator?
For example, I'd like to be able to use Dial.qml from the Qt Quick Components for Desktop to make a Dial element in a qml file in my project.
I used the instructions from the answer for this question: Qt How to make and install plugins? and was able to successfully use the qt quick desktop components within qt creator qml files. Here are more detailed instructions that I made:
These are alternative steps using a windows system and mingw which comes with Qt. For this example, I installed the Qt SDK to
C:\QtSDK
. For these instructions, I used Qt 4.8.1.;
then the path to Qt's mingw bin directory, in this case it isC:\QtSDK\mingw\bin
;C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin
;C:\QtSDK\mingw\bin;C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin
. Note that these paths could also be added anywhere and whichever order within the path variable.SET PATH=%PATH%;C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin
SET PATH=%PATH%;C:\QtSDK\mingw\bin
qmake && mingw-make install
C:\QtSDK\Desktop\Qt\4.8.1\mingw\imports\QtDesktop
so there is no need to manually move or create any folders.Attempt to compile and run the following code:
At the time of these instructions, the latest version of the QtDesktop components is 0.1. To check the version you installed, navigate to
C:\QtSDK\Desktop\Qt\4.8.1\mingw\imports\QtDesktop
and open the fileqmldir
with a text editor and notice the version number on each line.