Dummydata for signals / dummydata for attached properties



  • 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!



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.