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. Component not displayed in designer
Forum Update on Monday, May 27th 2025

Component not displayed in designer

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.6k Views
  • 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
    Sil20
    wrote on 6 Dec 2012, 14:22 last edited by
    #1

    Hi,
    I am currently developping an applycation base on QML component. I already developpe some components, I am using:

    • QTQuick 1.1,
    • QTcreator 2.5.82
    • QT 4.8

    My problem is Some of my component are displayed correctly in the Designer interface, and some are not.
    For Example the one illustrated in the following snapshot, is not displayed correctly when instanciate in the designer, and the size is 0x0 Even if I set width and height to 100 in the QML. Thow it is displayed correctly when going inside this object:
    !http://imageshack.us/a/img706/7590/tplnotdisplayed.jpg(Instancenotdisplayed.jpg)!
    !http://imageshack.us/a/img5/167/tplqml.jpg(Detailes Displayed)!

    Here is the beginning of the definition of this object
    @Rectangle {

    id: dialerView
    property real startAngle: 0
    property real stopAngle : 3*Math.PI/2
    property real xstepAngle : (steps.count==1)?(stopAngle-startAngle) :(stopAngle-startAngle) / (steps.count-1)
    SoundEffect{id: sound;source: "sound/clickerx.wav"}
    property string mLabelValue:"{A,1,0}{B,2,0}{C,3,0}"
    signal numberEntered(int number)
    property string colorText:"#000000"
    property int xCurrentPos:0
    property bool mTPLLight:true    // TPL with blink
    property int toggle:0
    property int xtextRadius:51
    
    property int  xlastX: -1;
    property int  xlastY: -1
    property int flagsTimer : 0
    property int flag : 5
    property int mCountClignotement:0
    property int mInitialPosition:0
    property string mImage:"Images/TPL_light_object_haut_off.svg"
    property string blinkImg:"haut"
    
    
    //-----------------------------------------------------------
    //Common Properties
    property int    mValue:0
    property string type : "TPL"
    property string instance : "TPL0215"
    
    //Individual Scaling
    property real scale: 1.1
    transformOrigin:Item.TopLeft
    transform:Scale{xScale:scale;yScale:scale}
    //-------------------------------------------------------------------
    
    
    width: 100
    height: 100
    

    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThomasHartmann
      wrote on 7 Dec 2012, 16:47 last edited by
      #2

      Hi,

      the reason is probably:

      SoundEffect{id: sound;source: "sound/clickerx.wav"}

      The Qt Quick Designer cannot instantiate the Component, because it does not know about
      SoundEffect.

      One solution would be to build share\qtcreator\qml\qmlpuppet in the Qt Creator source directory with a Qt version that supports the required components (in this case SoundEffect).
      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.

      We will try to make the Qt Quick Designer more error tolerant in the next version, so it is able to skip components like SoundEffect who probably have no visible effect anyway.

      Another workaround would be using a Loader to instantiate SoundEffect (or other components unknown to Qt Quick Designer).

      1 Reply Last reply
      0

      1/2

      6 Dec 2012, 14:22

      • Login

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