有沒有試過, 不知道可不可以?
bool QLayout::setAlignment ( QWidget * w, Qt::Alignment alignment )Sets the alignment for widget
w to
alignment and returns true if
w is found in this layout (not including child layouts); otherwise returns false.
void QLayout::setAlignment ( Qt::Alignment alignment )Sets the alignment of this item to
alignment.
See also QLayoutItem::setAlignment().
bool QLayout::setAlignment ( QLayout * l, Qt::Alignment alignment )This is an overloaded function.
Sets the alignment for the layout
l to
alignment and returns true if
l is found in this layout (not including child layouts); otherwise returns false.