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. QtCreator/Qlm2Puppet cannot render item with "imperative code"

QtCreator/Qlm2Puppet cannot render item with "imperative code"

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 3 Posters 8.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 28 Feb 2013, 13:05 last edited by
    #1

    Hi,
    I migrate my project from Qt4 Qtquick 1.0 to Qt5 Qtquick 2.0, QtDesigner 2.6.83

    Then when I use the designer to edit my components, I face the following issue:

    • Warnings: Imperative code is not supported in the Qt Quick Designer (M203) (Several Times)
    • Warnings:this Visual property binding cannotbe evaluated in the local context and might not show up in Qt Designer as expected
    • Error: Imperative code is not supported in the Qt Quick Designer (M203)

    When I go to the error there is just a value affectation:
    @function setDialerAngle(angle)
    {
    dialer_barre_up_on.rotation=angle ;
    }@

    If QtDesigner becomes not compatible with such a simple code it will be really become hard to use for more than just putting rectangles and static texts together.

    • Is there a way around?
    • Is it a bug or a feature test for the Beta version of QtDesigner?
    • Will this behavior become a rule? I hope not!
    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sil20
      wrote on 28 Feb 2013, 13:35 last edited by
      #2

      Additionnal information: when I put some Timer inside Items I have a message
      "This type is not supported in the Qt Quick Designer (M204)"

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sil20
        wrote on 28 Feb 2013, 16:33 last edited by
        #3

        Qt5 Qtquick 2.0, QtDesigner 2.6.83
        Still new informations. When rendering simple items in Qtdesigner, There are 3 Qml2Puppet.exe loaded in memory, each of them take 50Mb, which is hudge, but ignoring the warning allow me to edit the visual

        When rendering "Screens" which contain several Item there are 3 Qml2Puppet.exe loaded in memory, each of them take 1 550Mb, which is incredibely hudge!

        Comparing to QT4, QtQuick1, QtCreator 2.5.82 (2.6.0-beta)
        The same Simple Item rendering started 3 QmlPuppet.exe, in memory, each of them take 9Mb
        The same "Screens" which contain several Item there are 3 QmlPuppet.exe, in memory, each of them take only 58Mb

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 28 Feb 2013, 17:49 last edited by
          #4

          That seems to be a bug, please "report it":http://qt-project.org/wiki/ReportingBugsInQt.

          (Z(:^

          1 Reply Last reply
          0
          • T Offline
            T Offline
            ThomasHartmann
            wrote on 4 Mar 2013, 16:34 last edited by
            #5

            bq. If QtDesigner becomes not compatible with such a simple code it will be really become hard to use for more than just putting rectangles and static texts together.

            You can ignore the warning and uncheck the checkbox then you will never get the warning again (until you enable this in options again).
            We added this features to increase awareness that the designer does not "understand" imperative code.
            You can always move imperative code into a component.

            bq. When rendering “Screens” which contain several Item there are 3 Qml2Puppet.exe loaded in memory, each of them take 1 550Mb, which is incredibely hudge!

            We are not aware of this issue. Could it be that your qml2puppet is a debug build?

            I did a quick sanity check and could not reproduce this issue.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sil20
              wrote on 4 Mar 2013, 17:00 last edited by
              #6

              Well, my Qml2Puppet.exe is a release build. But my Qml Application is pretty "heavy". Tere are:

              • ~100 complexe Item
              • the rendering resolution is 4x HD (4* 192x1080)
              • there are Timers and multipletouche area, and SVG image files.

              But it was working in QT4 Qtquick1. Of course the MultipletouchAreas were replace by TouchAreas, and few modifications were required.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sil20
                wrote on 11 Mar 2013, 10:24 last edited by
                #7

                I now took Qtcreator 2.7.0-rc , and compiled it along with QML2Puppet.exe

                It works better for small QML, but as soon as the QML becomes heavy, all 3 qml2puppet.exe processes take 1.5Gb in memmory and everythinhg froze

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Sil20
                  wrote on 11 Mar 2013, 12:11 last edited by
                  #8

                  Another thing strange:
                  When I remove one instance from my Main QML application file, the Qml2Puppet processes take 12Mb more in memmory distributed in the 3 qml2puppets.exe.
                  And when I quit Designer, the qml2puppet processe spend more than 30seconds to stop, maybe more than 1 minute.
                  Here the code of one of the-- component I removed :
                  @// import QtQuick 2.0 //
                  import QtQuick 2.0

                  Rectangle {
                  id: rectangle1

                  property string mTextTop : "Defaut"
                  property string mTextTopSize : "13"
                  property string mTextBottomLeft : "A\nDefaut"
                  property string mTextBottomRight : "A\nDefaut"
                  property string mFontFamily : "Arial Narrow"
                  
                  property bool mTPLLabelBold : true
                  //Automatic Positionning
                  x:-25
                  y:-41    
                  
                  width: 200//parent!=undefined?200/parent.scale:200;
                  height: width
                  z: parent.z -1
                  scale:parent!=undefined?1/parent.scale:1;
                  
                  radius:width/2
                  border.width: 4
                  Component.onCompleted: {
                      if(parent!=undefined )
                      {
                          //Scale unsensitive to parent scale
                          scale=1/parent.scale;
                      }
                  }
                  
                  
                  
                  
                  property int colorIndex:0
                  property variant __mTextColor:["black","black","white","#black","#black","#black","#black","#black","#black","black"]
                  property variant __bgcolor:["white","#ea6b00","#1c5112","#a3db8f","#CAD3B6","#421010","#E0E0E0","#cde4ee","#c8ecc5ad","red"]
                  //    0: White
                  //    1: ORANGE
                  //    2: Green
                  //    3: light green
                  //    4: paleGreen
                  //    5: DarkRed
                  //    6: DarkWhite
                  //    7: LightBlue
                  //    8: LitePink
                  //    9: Red
                  
                  smooth: true
                  color: __bgcolor[colorIndex]
                  border.color: "#000000"
                  Text {
                      x: 0
                      y: 5
                      width: parent.width
                      color: __mTextColor[colorIndex]
                      text: mTextTop
                      style: Text.Normal
                      font.pixelSize: mTextTopSize
                      anchors.horizontalCenter: parent.horizontalCenter
                      anchors.top: parent.top
                      anchors.topMargin: 5
                      anchors.horizontalCenterOffset: 0
                      font.bold: mTPLLabelBold
                      font.family: mFontFamily
                      horizontalAlignment: Text.AlignHCenter
                  }
                  
                  Text{
                      x: 33
                      anchors.bottom: parent.bottom
                      anchors.bottomMargin: 28
                      y: 136
                      horizontalAlignment:Text.AlignLeft
                      font.bold: mTPLLabelBold
                      font.pixelSize: 11
                      font.family: mFontFamily
                      color:__mTextColor[colorIndex]
                      text:mTextBottomLeft
                      anchors.left: parent.left
                      anchors.leftMargin: 33
                  }
                  Text{
                      anchors.bottom: parent.bottom
                      anchors.bottomMargin: 27
                      x:parent.width/2
                      y: 137
                      width: 43
                      horizontalAlignment:Text.AlignRight
                      font.bold: mTPLLabelBold
                      font.pixelSize: 11
                      font.family: mFontFamily
                      color:__mTextColor[colorIndex]
                      text:mTextBottomRight
                      anchors.right: parent.right
                      anchors.rightMargin: 34
                      verticalAlignment: Text.AlignTop
                  }
                  

                  }
                  @

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    ThomasHartmann
                    wrote on 11 Mar 2013, 15:16 last edited by
                    #9

                    Could you do a bug a bug report with a "condensed" example?
                    We currently do not see the issue.

                    Also what platform are you using?

                    Thank you.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Sil20
                      wrote on 11 Mar 2013, 17:03 last edited by
                      #10

                      I added the example in the bugreport system:
                      "https://bugreports.qt-project.org/browse/QTCOMPONENTS-1310?focusedCommentId=197529#comment-197529":https://bugreports.qt-project.org/browse/QTCOMPONENTS-1310?focusedCommentId=197529#comment-197529

                      It is a simple example to produce the Issue, Few files;
                      In Panels directory just open the "PanelDebug2Puppet.qml" file in the designer

                      I am on Windows 7 64 bit Professionnal, QT5.0.1, qtcretor 2.7-rc, Qtquick2

                      1 Reply Last reply
                      0

                      1/10

                      28 Feb 2013, 13:05

                      • Login

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