Qt-Components + Qt Creator Design mode



  • I'm trying to install and use qt-components in Qt Creator, but I haven't managed to show them up in Design mode. Here are the specification:

    Ubuntu 10.04
    QtSDK 1.1 (/home/cremindes/QtSDK/)
    Qt Creator 2.2 (/home/cremindes/QtSDK/QtCreator2.2/)
    qt-components cloned (/home/cremindes/QtProjects/qt-components/) from git (git://gitorious.org/qt-components/qt-components.git) and compiled.
    ($PATH = /home/cremindes/QtSDK/Desktop/Qt/473/gcc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games )
    ($QTDIR = /home/cremindes/QtSDK/Desktop/Qt/473/gcc )

    I've have and read these threads:
    "Installing Qt-Components":http://developer.qt.nokia.com/forums/viewthread/3996/
    ".qmlproject file question":http://developer.qt.nokia.com/forums/viewthread/1508
    "Newbie question - how to show QML Components in Creator QML Design Window":http://developer.qt.nokia.com/forums/viewthread/1091
    "Qt Quick components for Symbian Technology Preview - Known issues / Troubleshooting":http://developer.qt.nokia.com/forums/viewthread/5068

    Based on these I have a simple base qml file with the line 'import Qt.labs.components.native 1.0' and I added the following line to .qmlproject file too: ' QmlFiles { directory: ["." , "/home/cremindes/QtSDK/Desktop/Qt/473/gcc/imports/Qt/labs/components/native"]
    } ' but Qt Creator should show qt-components without the last line too.

    Getting an error when switching to desing mode:
    ' Type dump C++ plugin failed. First 10 lines error:
    Usage: qmldump [plugin/import/path plugin.uri]
    Check 'General Messages' output pane for details. (4:1) '

    Sorry being to specific maybe, but I have been searching for the solution for a while now.



  • bq. ‘ Type dump C++ plugin failed. First 10 lines error:
    Usage: qmldump [plugin/import/path plugin.uri]

    This means the qmldump version you are using is outdated (the sources for a new one came with Qt Creator 2.2) - unfortunately you can't rebuild it easily because the Qt version that comes with the SDK does not have private headers...

    I'm afraid the only good solution right now is getting those private headers and recompiling qmldump (can be done from Creator->Settings->Qt4->Tools).



  • Oh, thanks, it's working now.

    I had to download the Qt 4.7.3 sources with the SDKMaintanceTool, because it didn't cover all the files that "gri posted":http://developer.qt.nokia.com/forums/viewthread/5267/#33193 .
    Then compiled it manually from terminal, because in my Qt Creator->Settings->Qt4->Tools, the QML Dump's build button is disabled (I don't now why ...).
    Finally it's working but has got "this bug":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-4634.

    I will try to compile qt-creator from git later, and see whether it fixes it or not :) Thanks for you help :)

    • It's a little bit tricky to make qt-components work these days, but QtQuick and QML is quite powerful, so it worths it. I hope it will be fully supported soon in the upcoming QtSDKs :)


  • So you can access all the module's types in the text editor now? Try ImplicitSizeItem, it's one of the types defined in com.nokia.symbian's plugin.



  • Yeah, Qt Creator recognize it and my QML file compiles as it should. Later I will compile the latest Qt Creator snapshot from git, and will see, whether the above bug disappear or not...



  • I have compiled qt-components, but i can't see them in the Qt Creator design mode, any suggestions?



  • Does it compiled without an error, and are the PATH and QTDIR variables correct?



  • Yeap, without error....the procedure that i have followed:

    configure
    mingw32-make
    mingw32-make install

    Now, there is a folder named "component" inside .....import/qt/



  • what should appear in the QtCreator? do you have a screenshot? I just have compiled: git://gitorious.org/qt-components/qt-components.git, do i have to clone the components.git?

    Thanks...



  • Since the support for Qt Quick Components is not official (yet) in the Visual Designer, getting them to work is not straight forward.

    The main problem is that for C++ to be able to load a plugin the compilers and Qt versions have to be compatible. We build Qt Creator with MSVC on Windows, but many people will use another compiler for Qt and the Components. So even setting QT_IMPORT_PATH does not work.

    To solve this we moved the QML stuff to another process called qmlpuppet.
    For Qt Creator 2.2 the only way to specify another qmlpuppet then the one, provided together with Qt Creator, is setting QTCREATOR_QMLPUPPET_PATH.

    To build a custom qmlpuppet just build src\tools\qmlpuppet (in the Qt Creator source) with the Qt version you want to use and
    set QTCREATOR_QMLPUPPET_PATH.

    Another solution is to just build Qt Creator yourself with the Qt Version you want to use for Qt Components.

    For the future we will make this easier of course.



  • Hmm, that was also new to me. My problem was, something similar, I had to recompile qmldump with my own Qt version, and copy it to my latest Qt Creator snapshot.



  • I see.. it seems no so easy to achieve, thank you for the tips!!!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.