eleanor
4th May 2009, 13:13
Hi...
currently I'm using this code:
/* images - on buttons */
close_icon = QIcon(":/close_image");
send_icon = QIcon(":/send_image");
ok_icon = QIcon(":/ok_image");
notok_icon = QIcon(":/notok_image");
/* buttons */
send_button = new QPushButton(send_icon, "Send");
send_button->setDisabled(true);
quit_button = new QPushButton(close_icon, "Quit");
attach_button = new QPushButton(ok_icon, "Attach more files");
validate_button = new QPushButton(ok_icon, "Validate");
/* buttons layout */
button_layout = new QHBoxLayout();
button_layout->addWidget(send_button);
button_layout->addWidget(quit_button);
/* validate layout */
validate_layout = new QHBoxLayout();
validate_layout->addWidget(attach_button);
validate_layout->addWidget(validate_button);
but if I resize the widget, the buttons are not resized with the widget (layout)... I want to resize buttons with application...so that they consume the whole space that is available.
Any ideas how to do that...thank you!
currently I'm using this code:
/* images - on buttons */
close_icon = QIcon(":/close_image");
send_icon = QIcon(":/send_image");
ok_icon = QIcon(":/ok_image");
notok_icon = QIcon(":/notok_image");
/* buttons */
send_button = new QPushButton(send_icon, "Send");
send_button->setDisabled(true);
quit_button = new QPushButton(close_icon, "Quit");
attach_button = new QPushButton(ok_icon, "Attach more files");
validate_button = new QPushButton(ok_icon, "Validate");
/* buttons layout */
button_layout = new QHBoxLayout();
button_layout->addWidget(send_button);
button_layout->addWidget(quit_button);
/* validate layout */
validate_layout = new QHBoxLayout();
validate_layout->addWidget(attach_button);
validate_layout->addWidget(validate_button);
but if I resize the widget, the buttons are not resized with the widget (layout)... I want to resize buttons with application...so that they consume the whole space that is available.
Any ideas how to do that...thank you!