On Wed, 9 May 2012 18:47:56 ext Canol Gokel wrote:
> Hello,
>
> I am beginner to the QML. I have a question on defining properties. I know
> that we can create properties of basic types like:
>
> property double myDoubleProperty
>
> My question is if we can define a property of type a custom element. For
> example, I have a MyPage element defined inside MyPage.qml. Can I define a
> property like:
>
> property MyPage myMyPageProperty
>
> If yes, how can I initalize it? Would this work:
>
> property MyPage myMyPageProperty: MyPage {}
>
> I tried the things I wrote above but they seem to be not working and I
> couldn't find an example which doesn't use basic types.
That should be working. Check that it is actually finding the MyPage type (for
example, by adding a MyPage {} underneath that property).
If it still doesn't work, please file a bug report at https://bugreports.qt-
project.org with the QML files that trigger this behavior.
--
Alan Alpert
Senior Engineer
Nokia, Qt Development Frameworks
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml