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. Dummydata for signals / dummydata for attached properties

Dummydata for signals / dummydata for attached properties

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 2.8k 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.
  • E Offline
    E Offline
    ephe
    wrote on last edited by
    #1

    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
    0
    • E Offline
      E Offline
      ephe
      wrote on last edited by
      #2

      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
      0

      • Login

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