Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Custom QML-Components with Designer integration

Custom QML-Components with Designer integration

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 4 Posters 4.5k 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.
  • S Offline
    S Offline
    selectedOne
    wrote on last edited by
    #1

    Hi Guys,

    i wrote a QtQuick-Plugin for drawing graphical-primitives like a Ellipse or a Line.
    It works well, but the Designer doesn't recognize my custom plugin (C++; Dll).
    I want to create a QML Component which is as comfortable to use as the Qt built-in Components e.g. Rectangle, MouseArea, etc.
    Is there a way to create such Components in my Custom Dll?

    How does it work?
    Does anybody have the same problem?

    EDIT:
    I found somebody having the same problem like me, but there is no solution... :-/
    "http://qt-project.org/forums/viewthread/2555":http://qt-project.org/forums/viewthread/2555
    Can anybody help?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Try looking at "this":http://qt-project.org/forums/viewthread/16588 one, too. Not exactly a solution, but might help.

      (Z(:^

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

        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
        your custom 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. You also have to install your custom components for this Qt version (in the imports directory).

        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.

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

          Hi Thomas,

          thank you for your advice.
          This works fine for the qt-components-desktop, but not for the qt-components-symbian and not for my own QtQuickPlugin.
          I'm not sure, but I think there are some things missing in my QtQuickPlugin.

          The elements in my Plugin are derived from QDeclarativeItem and they get drawn with the Paint signal.
          This works fine in the running mode, but i can't see anything in the Designer.
          Do you know a "HowTo" to create a QtQuickPlugin like the qt-components-desktop is?

          Mark

          1 Reply Last reply
          0
          • D Offline
            D Offline
            diro
            wrote on last edited by
            #5

            Hi, after some discussed, I still consider that it is a bug in subcomponentmanager.cpp (yeah, please refer to the link). You may try to compile your own QtCreator to solve this issue temporally.

            [quote author="sierdzio" date="1344432200"]Try looking at "this":http://qt-project.org/forums/viewthread/16588 one, too. Not exactly a solution, but might help.[/quote]

            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