Friday, July 25th 2008, 2:42am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, May 4th 2007, 11:51am

QT4 Designer :: Shape changing dialogs does not work!

Hi All,

I am learning QT. I have installed QT4 but the book I got is of QT3. Thinking that it should not be much of difference I started. But I got a problem in an example where book teaches to design shape changing dialog. Here when user are shown some options on the dialog. And when he clicks "More" button, he is shown more options in the dialog. So the dialog is extended. But I got following problem while designing this dialog.

When "More" button is not clicked extra options are not shown BUT "More "button is placed at the end of dialog and dialog is not resized. Means he is not shortened to give a feeling of small dialog. But when more button is clicked button goes up and other options are shown!

I got around this problem by manually editing ui_xxxx.h file. I added following line in this file's setupUi function.

ui.gridLayout->setSizeConstraint (QLayout::SetFixedSize);

Here gridLayout is the main topmost layout in my dialog. If I do this all is fine. Now my question is "Can I set sizeConstraint property of grid layout in QT Designer?"

Please help me, as I do not want to edit my ui_xxxx.h file manually each time!

___________________ << ___________________
|..............................| |..............................|
|..............................| |..............................|
|..............................| |..............................|
|..............................| |..............................|
|..............................| |..............~~~~~ ....|
|..............................| |.............|...MORE.|...|
|..............................| |.............~~~~~~....|
|..............................| ~~~~~~~~~~~~~~~
|..............................|
|..............................| (B) Correct Position of "More" Button. But this is not
|..............................| Coming!
|..............................|
|..............................|
|..............................|
|..............................|
|.............~~~~~~....|
|.............| MORE |.....|
|.............~~~~~~....|
~~~~~~~~~~~~~~~

(A) Incorrect position of "More" Button





Thanks,
Mystique
  • Go to the top of the page

2

Friday, January 11th 2008, 8:22pm

RE: QT4 Designer :: Shape changing dialogs does not work!

Hi!
I'm looking for setting the SizeConstraint in the Designer, too.
maybe this is a noobish question, cause no answers in here till now ;)
PS: I'm using the Designer of Qt v4.3.3...
  • Go to the top of the page

Rogus

Beginner

Posts: 8

Location: Warsaw, PL

3

Wednesday, March 12th 2008, 6:10pm

RE: QT4 Designer :: Shape changing dialogs does not work!

@Daxtar: Press CTRL+I or go to Tools --> Properties Editor (if you don't have one already). When it appears click on anything you want to set size constraint of and edit minimumSize and maximumSize in the properties editor. Set the values which suit you. Hope it's what you wanted
  • Go to the top of the page

Rate this thread