View Full Version : QDialog Resize

22nd October 2008, 16:14
I am showing a QDialog from parent widget. i am initializing the dialog and placing a image(stretching to 640x480) on it by means of horizontal layout. Now i am facing two problems:
1. QDialog pops up and the image will showned in exact manner. but there will be empty space at the bottom of dialog. how can i remove these empty space. so that space is less and equally distributed aside the image border.

2: While resizing the QDialog it is resizing to the initial size. i just use setMinimumSize().

How can i resolve this problems????

22nd October 2008, 16:19
do you use layouts?

22nd October 2008, 16:39
yes.... Actually it resized. but when i leave the mouse it will come to normal state. I am not even handling MouseEvent

22nd October 2008, 16:41
try to use this method QLayout::setContentsMargins (http://doc.trolltech.com/4.4/qlayout.html#setContentsMargins)