[Qt-qml] Avoid binding warnings on object creation
Leonardo Cunha
leo.cunha at nokia.com
Fri Sep 3 12:13:17 CEST 2010
Any plans for when this fix will reach Qt? Any chance for 4.7.1?
In qt-components, we currently have 3 of those warnings and we are doing
workarounds to avoid getting more of them :-(
br,
// leo
> -----Original Message-----
> From: Jones Martin (Nokia-MS-Qt/Brisbane)
> [mailto:martin.jones at nokia.com]
> Sent: Friday, September 03, 2010 12:14 AM
> To: ext Adriano Rezende; Cunha Leo (Nokia-MS-Qt/Oslo)
> Cc: qt-qml at trolltech.com
> Subject: RE: [Qt-qml] Avoid binding warnings on object creation
>
> This is a bug. The attached patch fixes it.
>
> BR,
> Martin.
>
> -----Original Message-----
> From: qt-qml-bounces at trolltech.com [mailto:qt-qml-
> bounces at trolltech.com] On Behalf Of ext Adriano Rezende
> Sent: Friday, 3 September 2010 3:01 AM
> To: Cunha Leo (Nokia-MS-Qt/Oslo)
> Cc: qt-qml at trolltech.com
> Subject: Re: [Qt-qml] Avoid binding warnings on object creation
>
> > I am using the Component::createObject(parent) and inside the
> > component I have bindings to its parent, like:
> > Item {
> > id: page
> > // FIXME: the line below creates warnings when the page component
> > is instantiated
> > width: parent.width
> > }
> >
> > I get these warnings when instantiating the page: "Unable to assign
> > undefined value"
> >
> > Is there any workaround for avoiding these binding's warnings when
> > instantiating a dynamic object?
>
> I think this is the same problem I was facing.
>
> I created a suggestion in JIRA related to this behavior:
> http://bugreports.qt.nokia.com/browse/QTBUG-13170
>
> The problem is that when creating an object dynamically, the parent is
> set after all properties have been initialized. So, the parent itself
> does not exist at the initialization time.
>
> Br,
> Adriano
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list