On Fri, 20 Jan 2012 09:12:14 ext André de Castilho wrote:
> Hi everybody,
> 
> I am struggling for about two days trying to use the Qt Components for
> Desktop plugin, and its README lead me to this mailing list.
> 
> My project involves using a Linux running on an ARM as a standalone
> device, with a GNOME based linux distro. Because of that, I was pretty
> happy when I stumbled upon Components for Desktop, as it gave me the
> look and feel of a mobile app, with all the nice features of QML
> running on GNOME.
> 
> My happiness didn't last long, as I could not get it up and running
> with Qt Creator.
> 
> On to the facts:
> 
> 1. I'm running Ubuntu 11.10.
> 2. I got the Qt SDK 1.1.4 two days ago from
> http://qt.nokia.com/downloads and installed it with the online
> installer.
> 3. Cloned the git repo from http://qt.gitorious.org/qt-components/desktop.
> 4. Entered the directory where I cloned the repo, ran 'qmake' and then
> 'sudo make install'.
> 5. All went apparently smooth, and the install created the folder
> /usr/lib/qt4/imports/QtDesktop
> 6. I opened the Browser.qml example shiped with the plugin with
> QtCreator (with File->Open Project or File), and the second line of
> the file (import QtDesktop 0.1) gets underlined. Mouse over tells me:
> QML Module not found. Try to change the QML_IMPORT_PATH.
> 7. Executing ./qmldesktopviewer/qmldesktopviewer
> examples/TopLevel.qml, on the other hand, worked like a charm.
> 
> As I don't want to make a top level window with QML (I intend to
> create my window with Qt, and implement only two dynamic sidebars in
> QML), i got a little confused on why it didn't work on QtCreator. So
> far as I understood (and I think it wasn't really that far),
> qmldesktopviewer is only needed to stop QmlViewer to create the main
> window itself. The fact that Qt Creator does not find the QtDesktop
> 0.1 import I'm guessing has something to do with where the module got
> installed, and if everything is on the right place, I think I could be
> able to use the SDK to play with the desktop components, right?
> 
> What I already tried:
> 
> 1. I've read the three documents linked on the project's git repo, and
> read all the comments with no success.
> 2. I've googled it, and found a promising link at the qt developer
> forum: http://developer.qt.nokia.com/forums/viewthread/13453
>     - I've gave the idea markc gave a try (trying to make and make
> install the project with QtCreator), but got no luck with that.
> 
> My questions:
> 
> 1. Is Qt Components for Desktop intended for use with Qt Creator? Does
> it work with it?
>
> 2. If it does, any ideas on why it is not recognizing the import on
> Creator, but recognizes it with qmldesktopviewer?


It can work with it, but does not by default. When using your own QML plugins 
with creator theres an extra step you have to perform to make it known to 
creator. I forget exactly what this step is, but it involves running the 
qmlplugindump utility and placing the output somewhere creator can find it. 
For Qt Creator to recognize a module, it needs this metadata, which is why 
modules can be unknown to creator but loaded properly in qmlviewer.

-- 
Alan Alpert
Senior Engineer
Nokia, Qt Development Frameworks
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to