[Qt-qml] Dummy model for QList<QObject*> model
michael.brasser at nokia.com
michael.brasser at nokia.com
Wed Sep 15 05:08:34 CEST 2010
On 14/09/2010, at 9:10 PM, ext Cornelius Hald wrote:
> Hi!
>
> On Tue, 2010-09-14 at 01:00 +0200, michael.brasser at nokia.com wrote:
>> Is the above the exact wording of the error message you are seeing (if so, what release version are you using)? If the objects in the list are QtObjects, I get the message "Cannot assign to non-existent property "name"", but as long as they are of a custom type that we've defined (in this case MyObject), with the corresponding custom properties, it all works as described for me (note that MyObject.qml needs to go in the root directory, rather than the dummydata directory). I'm happy to send you a tar of the files I'm testing with, if this is still something you want to pursue.
>
> The error above is the error I receive from QtCreator. I noticed that I
> can still execute the code with qmlviewer. So it looks like a QtCreator
> issue. Still, I'm having the problem with the import of MyObject. For
> some reason dummydata/myModel.qml can't find MyObject.qml. Not if I put
> it into 'dummydata' and not if I put it into the parent folder (which is
> not the root folder). I've tried different imports relative to
> myModel.qml and relative to the component that uses myModel.qml, but
> without success.
I was wrong -- it was picking the file up for me because the root folder happened to be my working directory. With change http://scm.dev.nokia.troll.no/projects/qt/repos/qt-qml/commits/a2ca8c305e6ebe145b82588d088f5dc16a4db861 MyObject should be picked up if placed within the dummydata folder.
Regards,
Michael
More information about the Qt-qml
mailing list