|
|
Container widget for buttons.
This class uses Qt layout control to place the buttons; can handle
both vertical and horizontal button placement. The default border
is now 0
(making it easier to deal with layouts). The space
between buttons is now more Motif compliant.
|
Create an empty container for buttons.
If _orientation
is Vertical,
the buttons inserted with
addButton() are laid out from top to bottom, otherwise they
are laid out from left to right.
~ |
Free private data field
QSize |
[const virtual]
This size is calculated by the width/height of all buttons plus border/autoborder.
Returns: The minimum size needed to fit all buttons.
QSizePolicy |
[const virtual]
void |
[virtual]
QPushButton * |
Add a new QPushButton.
Parameters:
noexpand | If noexpand is false, the width
of the button is adjusted to fit the other buttons (the maximum
of all buttons is taken). If noexpand is true, the width of this
button will be set to the minimum width needed for the given text).
|
Returns: A pointer to the new button.
QPushButton * |
Add a new QPushButton.
Parameters:
receiver | An object to connect to. |
slot | A Qt slot to connect the 'clicked()' signal to. |
noexpand | If noexpand is false, the width
of the button is adjusted to fit the other buttons (the maximum
of all buttons is taken). If noexpand true, the width of this
button will be set to the minimum width needed for the given text).
|
Returns: A pointer to the new button.
void |
Add a stretch to the buttonbox.
Can be used to separate buttons. That is, if you add the buttons OK and Cancel, add a stretch, and then add the button Help, the buttons OK and Cancel will be left-aligned (or top-aligned for vertical) whereas Help will be right-aligned (or bottom-aligned for vertical).
/** This function must be called once after all buttons have been inserted.
It will start layout control.
See also: QBoxLayout, */, void, addStretch(int, scale, =, 1);
QSize |
[protected const]
Returns: the best size for a button. Checks all buttons and takes the maximum width/height.
void |
[protected]
QSize |
[protected const]
PrivateData * |
[protected]