Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Dummydata for signals / dummydata for attached properties

    QML and Qt Quick
    1
    2
    2651
    Loading More Posts
    • 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.
    • E
      ephe last edited by

      I have implemented some attached properties in C++ which work perfectly fine in QML.

      Now our designers would like to use these QMLs too. But they do not have access to the C++ code.
      Therefore I wanted to create some dummydata.

      I created the dummydata folder and a qml file MyAttachedProps.qml:
      @
      import QtQuick 1.1

      Item {
      property string prompt: "my control"
      }
      @

      When I use MyAttachedProps.prompt in the real QML file, it is replaced with the prompt of the dummydata.
      The output is: Loaded dummy data: "E:/Pegasus_Screen_Components/dummydata/ComboLineCtrlProps.qml"
      So for simple properties, this is working fine.

      I now also have a signal in C++: mySignal, which would be called like this: MyAttachedProps.onMySignal: ...

      I don't know how I can put this in the dummydata? The output is:
      @
      file:///C:/MyProject/MyControl.qml:67:5: Non-existent attached object
      MyAttachedProps.onMySignal: ...
      ^
      @
      What am I doing wrong?

      And what do I have to do that the "import MyModule 1.0" is recognized? The output there is:
      @
      file:///C:/MyProject/MyControl.qml:3:1: module "MyModule" is not installed
      import MyModule 1.0
      ^
      @
      Thank you!

      1 Reply Last reply Reply Quote 0
      • E
        ephe last edited by

        I could solve the import problem. The solution is "here":http://developer.qt.nokia.com/forums/viewthread/14913. But I still have the same problem with the attached properties.
        Maybe someone can help me?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post