PDA

View Full Version : Qt4 - VisualStudio 2005



JeffJones
22nd May 2007, 17:14
Evaluating Qt4 on WindowsXP with Visual Studio 2005.

I have searched the forums, and find vague responses (fiddle with SizePolicy, etc) that do not seem to have any effect in my situation.

Cannot seem to get any layout to function at all. I have read the documentation, gone through the QtDesigner docs, doing the "Qt Integration for VS" tutorial.

They all say, drop a couple widgets, select and apply a layout. But either running it in preview or building and running, stretching the dialog has no effect on the widgets contained therein.

What do I have to do to get a layout to function as expected? What am I missing please?

Thanks,
Jeff

jpn
22nd May 2007, 17:18
Sounds like you're missing the top level layout. Layouting a group of children constructs a "floating layout" but you want a layout installed on the form itself. Deselect all child widgets, open up context menu over the background of the form and choose "Layout->...".

JeffJones
22nd May 2007, 18:12
Thanks J-P!!! That was it. Nothing, and I mean nothing, in the docs mentioned anything about this. I merely followed the instructions in the tutorial. Thanks.

Also, in the docs, I can find nothing about properties that control resizing behavior and what each does. For example, the help on VerStretch says Sets the VerStretch property. Truly frustrating, but the usual state of documentation in the software industry.:eek:

So - anything you can provide or point me to on this please?

Thanks again,
Jeff

marcel
22nd May 2007, 18:19
Read this:
http://doc.trolltech.com/4.2/layout.html#stretch-factors

regards

JeffJones
22nd May 2007, 18:24
Read this:
http://doc.trolltech.com/4.2/layout.html#stretch-factors

regards
Thank you. That is in the docs under Layout Management. Great resource.

Jeff