Use CustomMessageBox::selectable
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
02ca6bea8c
commit
da007d6212
4 changed files with 15 additions and 17 deletions
|
@ -21,7 +21,8 @@ QMessageBox* selectable(QWidget* parent,
|
|||
const QString& text,
|
||||
QMessageBox::Icon icon,
|
||||
QMessageBox::StandardButtons buttons,
|
||||
QMessageBox::StandardButton defaultButton)
|
||||
QMessageBox::StandardButton defaultButton,
|
||||
QCheckBox* checkBox)
|
||||
{
|
||||
QMessageBox* messageBox = new QMessageBox(parent);
|
||||
messageBox->setWindowTitle(title);
|
||||
|
@ -31,6 +32,8 @@ QMessageBox* selectable(QWidget* parent,
|
|||
messageBox->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
messageBox->setIcon(icon);
|
||||
messageBox->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
if (checkBox)
|
||||
messageBox->setCheckBox(checkBox);
|
||||
|
||||
return messageBox;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue