I am dynamically creating an object which is working fine. I set the
parent of the object to a GridLayout. That also works fine. I want to
set the Layout's attached properties of my object, but it's not working.
Here's a small sample

|var component; var button; component =
Qt.createComponent("CustomButton.qml"); button =
component.createObject(gridLayout); button.Layout.maximumWidth = 10;
button.Layout.maximumHeight = 10; |

I get the error "TypeError: Type error" when accessing
button.Layout.maximimWidth. The button is properly created and I can see
it and use it in the gui. If I comment out setting the maximum width and
height, everything works except the size is not what I want.

It looks like the button is not getting the Layout attached property
when I dynamically create it. When I create it statically in a qml file,
everything works fine.

Any help would be greatly appreciated.

-- 
Lorne Sturtevant
Sum Ergo Cogito

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to