This post has been edited 2 times, last edit by "babu198649" (Oct 24th 2007, 12:47pm)
Quoted
From Qt doc
sizePolicy : QSizePolicy
This property holds the default layout behavior of the widget.
Quoted
Originally posted by babu198649
i was also facing the same problem and i have solved by coding.
Quoted
Originally posted by babu198649
now use the resize event function of designer form by subclassing designer form and inside the resize event ,resize the layoutWidgetto the size of central widget of ui_designerfile
This post has been edited 1 times, last edit by "babu198649" (Oct 25th 2007, 10:48am)
Quoted
Originally posted by babu198649
u r form works(untitled_2) ,this is because it doesnot have any layout .
|
|
Source code |
1 |
<layout class="QVBoxLayout" > |
Quoted
Originally posted by babu198649
but the actual problem is resizing the layout in designer.
|
|
Source code |
1 2 3 4 |
Form QWidget
+-- verticalLayout QVBoxLayout
+-- pushButton QPushButton
+-- pushButton_2 QPushButton
|
Quoted
Of course not, I have set a vertical layout to the form. If not when you resize the form, the push buttons will not be resized as it is. To ensure you that i have set a layout, edit the file untitled_2.ui into a text editor and look at the line 15, you will see:
Quoted
a layout cannot be resized they haven't any method like resize() or setGeometry().
|
|
Source code |
1 2 3 4 |
Form QWidget
+-- verticalLayout QVBoxLayout
+-- pushButton QPushButton
+-- pushButton_2 QPushButton
|
Quoted
Actually, verticalLayout is not an instance of QVBoxLayout
Quoted
but an instance of QWidget on which a QVBoxLayout has been set.
Quoted
Originally posted by babu198649
when i viewed the ui_untitled_2.h file generated by qmake i found that the parent of the form is vertical layout. that is what i wanted ,but how did u did it in designer please explain.
Quoted
Originally posted by babu198649
if a layout cannot be resized then how does it expands(verticallayout) when the form is maximized(since, parent of form is vertical layout)
This post has been edited 1 times, last edit by "babu198649" (Oct 26th 2007, 11:14am)