Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] qtc-qmldump - How to use it the right way?
Forum Updated to NodeBB v4.3 + New Features

[Solved] qtc-qmldump - How to use it the right way?

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 2 Posters 5.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theoriginalgri
    wrote on last edited by
    #1

    Hello,

    I've created a plugin for QML and now I want to add its information to the syntax highlighter.

    "This bug entry":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3289 says Qt Creator will try to automatically execute qtc-qmldump when adding importPaths in the .qmlproject file - for me, this doesn't work.

    So I tried to run it manually. Where ever I execute it, "qmldump" or "qmldump . org.maemo.Packaging", it always results in the same messages:
    @QDeclarativeComponent: Component is not ready
    Could not create "PathPercent" : "xxx:3 module "org.maemo.Packaging" is not installed"
    QDeclarativeComponent: Component is not ready
    Could not create "Repeater" : "xxx:3 module "org.maemo.Packaging" is not installed"@

    The plugin works well in qmlviewer (both debug and release).

    Anyone got a hint for me?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      theoriginalgri
      wrote on last edited by
      #2

      Ok, I solved this now.

      Solution (for QtSDK 1.1):

      • Use Qt Creator 2.2 RC
      • Rebuild the "<qtcreator>/share/qtcreator/qml/qmldump" tool (on Windows - Linux may use a different directory)
        ** Copy private headers from "<qtsdk>/QtSources/4.7.3"
        ** Copy the generated binary to "<qtsdk>/Desktop/Qt/4.7.3/msvc2008/qtc-qmldump/debug"

      From now on you can enjoy code completion for your own (c++) components and even use them in the designer :)

      1 Reply Last reply
      0
      • I Offline
        I Offline
        icetbr
        wrote on last edited by
        #3

        Hi, could you please elaborate on Copy private headers from “<qtsdk>/QtSources/4.7.3” ?

        Should Icopy the entire folder to <QtSDK>\qtcreator\share\qtcreator\qml\qmldump ? Can't I use

        qmake "QT-PRIVATE-HEADERS=<QtSDK>/QtSources/4.7.3" ?

        Both approaches haven't worked for me

        1 Reply Last reply
        0
        • T Offline
          T Offline
          theoriginalgri
          wrote on last edited by
          #4

          You don't need to copy all private headers. Just a few. The qmldump.pro has no references for QT_PRIVATE_HEADERS, so the second approach won't work.

          I've packaged the headers for you "here":http://gri.not-censored.com/qmldump_private_headers.zip. Extract these directories into to directory where qmldump.pro is and you'll be fine.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            icetbr
            wrote on last edited by
            #5

            It worked! Thanks

            I'm a bit newbie at this, but where did you get these files? My QtSDK has all these files, but in different folders. Do I have to build Qt to get that folder structure?

            qobject_p.h is in src\corelib\kernel , for instance
            src\declarative\qml its in qdeclarativemetatype_p.h

            1 Reply Last reply
            0
            • I Offline
              I Offline
              icetbr
              wrote on last edited by
              #6

              I mean, build with the -developer-bulild flag. It seems that it's the only way

              1 Reply Last reply
              0
              • T Offline
                T Offline
                theoriginalgri
                wrote on last edited by
                #7

                If you try to build the "<qtsdk>/QtSources/4.7.3", it executes "syncqt" (in the bin-dir). This creates the include folder and its contents. To save space on my disk I just did the same as syncqt does by hand only with the required headers to build qmldump.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  icetbr
                  wrote on last edited by
                  #8

                  Didn't know that. Thanks again!

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved