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. QMLDesigner and QtDesktop components

QMLDesigner and QtDesktop components

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 3 Posters 4.6k 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.
  • M Offline
    M Offline
    malos
    wrote on last edited by
    #1

    Hi,

    I have trying to use QtDestop components within QtCreator's QMLDesigner.

    When opening examples/TopLevel.qml, text is underlined when in edit mode for QtDesktop widgets and new properties.
    And in edit mode, I get 'invalid property name shortcut' error message.

    I am using Qt 4.8.2, QtCreator 2.5.0 that I recompiled both under MinGW.

    On the other hand, it works fine either with qmlviewer or qmldesktopviewer.

    I did install QtDesktop components using 'make install' and generating manually plugins.qmltypes using qmlplugindump.

    I have been trying to dig onto QtCreator source code, it seems that QtDesktop dll is never loaded. Could it be an explanation of the error?

    Could anybody plz help me to point what I forgot to be able to use QtDesktop components in design mode?

    Thanks in advance.

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

      Hi,

      Qt Quick Designer uses an external process called qmlpuppet to render components.
      By default a qmlpuppet shipped together with Qt Creator is used. This one does not support
      QtDesktop components.

      The solution is to build share\qtcreator\qml\qmlpuppet in the Qt Creator source directory with a Qt version that supports the required components (in this case the QtDesktop components).

      Building qmlpuppet will install an executable for rendering components in the /bin directory of the Qt building it. Qt Quick Designer checks for the Qt of the current project if a qmlpuppet is in the /bin directory. If yes it takes the qmlpuppet provided by the Qt version instead of the one provided by Qt Creator itself. This is a generic solution to be able to render any component available in a specific Qt.

      For the ‘invalid property name shortcut’ error message I have no immediate solution.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        malos
        wrote on last edited by
        #3

        Hi Thomas,

        Thanks for your quick reply.
        What do you mean by "a Qt version that supports the required components"? is it a Qt version where QtDesktop components are available from "imports" subfolder?

        Anyway, I have been following your advice. I builded qmlpuppet from share\qtcreator\qml\qmlpuppet in the Qt Creator source directory, but it did not change anything.

        I will try to get the latest Qt and QtCreator versions and let you know.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          malos
          wrote on last edited by
          #4

          Hi,

          I tried Qt5 but could not compile QtCreator.
          I think that I will have to stick with Qt 4.8. But I still have the problem.

          Was anybody able to use QtDesktop components with QtCreator in design mode?

          Any hint welcome.

          Thks.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            selectedOne
            wrote on last edited by
            #5

            Hi,

            I was able to use the QtDesktop components with QtCreator in designer mode.
            I followed Thomas instructions with the qmlpuppet and then it worked.
            I'm working with Qt 4.8.2 and Creator 2.5.1 and WinXP.

            @Thomas: I would also be interested in what you mean by "a Qt version that supports the required components".

            But I still have an other problem with the designer mode:
            I created an own plugin following these instructions:
            "Klick!":http://doc.qt.nokia.com/4.7-snapshot/declarative-tutorials-extending-chapter6-plugins.html
            The components which included in my plugin are not shown in the designer preview of the qml file.
            Does anybody know what i can do?

            Mark

            1 Reply Last reply
            0
            • M Offline
              M Offline
              malos
              wrote on last edited by
              #6

              Hi Mark,

              What is your secret to use QtDesktop components with QtCreator in designer mode?
              I still can not preview TopLevel.qml from QtDesktop examples.
              Does it work for you?

              About your question did you try to use qmlplugindump ( as explained in http://doc.qt.nokia.com/qtcreator-2.3/creator-qml-modules-with-plugins.html)?

              malos

              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