Hi, I hope this is the right place to ask this.
I've got a simple Qml, which I'm trying to control using C++. What I want to happen is that when the C++ class does something, it triggers an update to the displayed elements (simple labels and rectangles) in the Qml file. This works fine on Win7, but I just cannot get it to work on embedded EC7.

I've got a class which extends QThread and I'm using a Q_OBJECT macro and two Q_PROPERTY fields defined in the hpp, like so:
Qt Code:
  1. Q_PROPERTY(int percent READ getPercent WRITE setPercent NOTIFY percentChanged)
  2. Q_PROPERTY(QString currentName READ getCurrentName WRITE setCurrentName NOTIFY nameChanged)
To copy to clipboard, switch view to plain text mode 
When I call the setCurrentName() or setPercent() methods, then it does correctly go into the moc file for signalling, so I'm pretty sure that the communication between C++ and qml is working properly.

I give this object to the context like this:
Qt Code:
  1. QQuickView oView;
  2. oView.rootContext()->setContextProperty("nameofmyobject", (QObject*) &object);
  3. oView.setSource(QUrl::fromLocalFile("myfile.qml"));
  4. oView.show();
To copy to clipboard, switch view to plain text mode 
So according to this wiki page, that should give the QML engine / viewer a reference to the object I'm using. And this works fine in Win7.

Now the qml. If I just define simple labels like this:
Qt Code:
  1. Text {
  2. id: percentText
  3. text: "the percent"
  4. x : 490; y : 235
  5. }
To copy to clipboard, switch view to plain text mode 
then the label is displayed. Obviously my getPercent() method isn't being called, because it's not referenced anywhere, but the label is shown correctly on the screen.
Now if I change this to:
Qt Code:
  1. Text {
  2. id: percentText
  3. text: nameofmyobject.percent
  4. x : 490; y : 235
  5. }
To copy to clipboard, switch view to plain text mode 
then the label isn't displayed at all. Instead, I get a wonderfully descriptive error message when the setSource() method is called: "<Unknown File>:" (apparently this is a QDeclarativeError with an empty url and empty description). And still the getPercent() method isn't called at all. I'm assuming that the parsing / binding of the qml file failed when loading it, and now that whole Text element is being completely ignored.

The confusing thing is, that exactly the same code works fine on Win7. I have a Rectangle whose width is set by percent, a Text element showing the percent, and another Text element showing the currentName. Yet if I try to use any of these things on embedded EC7, I get one of those wondeful error messages per definition, and then that element doesn't appear at all.

Can anyone please spot what I'm doing wrong here? Is there an important difference between Win7 and EC7 that I'm missing?
Thank you!