Defeatist
10th February 2010, 19:10
Hi! I'm not sure what values to use in the following situation:
verticalSpacer = new QSpacerItem(/*???*/); // Not sure what to make of this
verticalLayout_2 = new QVBoxLayout();
verticalLayout_2->addWidget(advancedButton);
verticalLayout_2->addWidget(addButton);
verticalLayout_2->addWidget(removeButton);
verticalLayout_2->addSpacerItem(verticalSpacer);
If I simply add two integers for w and h it works but not as I want it; I want it to push the 3 buttons completely together regardless of the window size
The description on the online documentation confuses me
QSpacerItem::QSpacerItem ( int w, int h, QSizePolicy::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )
Constructs a spacer item with preferred width w, preferred height h, horizontal size policy hData and vertical size policy vData.
The default values provide a gap that is able to stretch if nothing else wants the space.
How do I make verticalSpacer take up all available space in the vertical direction?
Thanks in advance
verticalSpacer = new QSpacerItem(/*???*/); // Not sure what to make of this
verticalLayout_2 = new QVBoxLayout();
verticalLayout_2->addWidget(advancedButton);
verticalLayout_2->addWidget(addButton);
verticalLayout_2->addWidget(removeButton);
verticalLayout_2->addSpacerItem(verticalSpacer);
If I simply add two integers for w and h it works but not as I want it; I want it to push the 3 buttons completely together regardless of the window size
The description on the online documentation confuses me
QSpacerItem::QSpacerItem ( int w, int h, QSizePolicy::SizeType hData = QSizePolicy::Minimum, QSizePolicy::SizeType vData = QSizePolicy::Minimum )
Constructs a spacer item with preferred width w, preferred height h, horizontal size policy hData and vertical size policy vData.
The default values provide a gap that is able to stretch if nothing else wants the space.
How do I make verticalSpacer take up all available space in the vertical direction?
Thanks in advance