[Qt-qml] a little question/suggestion about "qml widgets"

michael.brasser at nokia.com michael.brasser at nokia.com
Tue May 4 01:37:41 CEST 2010


On 01/05/2010, at 11:39 PM, ext Gianni Valdambrini wrote:
> I'm writing a demo application using both standard C++ widgets and Qml 
> widgets (through QDeclarativeView). Standard widgets and qml widgets are 
> put in a gridlayout of a standard c++ widget.
> My Qml widgets have the item "Rectangle" as the root item so they have 
> width and height properties. However, I had to subclass the 
> QDeclarativeView to redefine the sizeHint and the minimumSizeHint 
> methods, otherwise the gridlayout doesn't work properly.

Can you give more detail -- what do you mean by doesn't work properly?

Have you tried changing the resizeMode of QDeclarativeView? (perhaps you are after a 'synchronized' resizing rather than the two one-way modes provided by the enum?)

Regards,
Michael





More information about the Qt-qml mailing list