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. Cannot use QML designer with custom components
Forum Updated to NodeBB v4.3 + New Features

Cannot use QML designer with custom components

Scheduled Pinned Locked Moved QML and Qt Quick
14 Posts 5 Posters 11.7k 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.
  • A Offline
    A Offline
    alexander
    wrote on last edited by
    #3

    Of course, sometimes it's not convenient:(

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

      Come on, just bounding box around the custom component would be enough. I don't even need much the actual content.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexander
        wrote on last edited by
        #5

        But what size of bounding box must be?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          strekazoid
          wrote on last edited by
          #6

          Width, height, x and y are specified inside the custom component.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alexander
            wrote on last edited by
            #7

            I also thought about this, but I think this approach has some pitfalls:(

            1 Reply Last reply
            0
            • S Offline
              S Offline
              strekazoid
              wrote on last edited by
              #8

              But I mean, qmlviewer is able to interpret everything right. Why can't Qt creator?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alexander
                wrote on last edited by
                #9

                You use own qml plugins? QDeclarativeExtensionPlugin

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  edis
                  wrote on last edited by
                  #10

                  In my case, it runs, but displays 'Package not found'

                  --
                  EDIS Interactive
                  http://edis.mx
                  http://vimeo.com/edis

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

                    It may cause by qmldump.exe
                    The QtCreator will call qmldump to get the plugin information. And sometimes it cannot output the info by pipe.
                    You can try this:
                    qmldump.exe COMPONENT 1.0
                    and you will see some information, but if you try
                    qmldump.exe COMPONENT 1.0 >> info.txt
                    the info.txt may be empty, and it is why QtCreator cannot get the plugin information!

                    How to fix:
                    edit the source code of qmldump, add this statement fflush(stdout); after std::cout << bytes.constData(); (about line 578)

                    1 Reply Last reply
                    0
                    • AlicemirrorA Offline
                      AlicemirrorA Offline
                      Alicemirror
                      wrote on last edited by
                      #12

                      This discussion is interesting, but please I need a clarification on the means of the terms. For custom components you mean a totally new component of a non-standard qml object?

                      Then does someone knows if there is a method to create designs using components that are defined using the Loader element?

                      Thank you.

                      Enrico Miglino (aka Alicemirror)
                      Balearic Dynamics
                      Islas Baleares, Ibiza (Spain)
                      www.balearicdynamics.com

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        edis
                        wrote on last edited by
                        #13

                        With Qt Creator 2.4 it works fine most of the time!

                        --
                        EDIS Interactive
                        http://edis.mx
                        http://vimeo.com/edis

                        1 Reply Last reply
                        0
                        • E Offline
                          E Offline
                          edis
                          wrote on last edited by
                          #14

                          In fact, this is still a problem.

                          Any custom component is rendered with a blank box. While this makes it possible to use the designer to "design" it. In fact it is almost useless.

                          The example:
                          http://doc.qt.nokia.com/4.7-snapshot/declarative-tutorials-extending-chapter1-basics.html

                          Will render fine in the running app, but QtCreator's designer will render a blank box making it impossible for designers to design anything.

                          How can we create a new C++ element that will render in both cases?

                          --
                          EDIS Interactive
                          http://edis.mx
                          http://vimeo.com/edis

                          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