Commit 52b8bbea authored by Laurent Montel's avatar Laurent Montel 😁

Use QToolButton here

parent eb30062b
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <QPointer> #include <QPointer>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QToolButton>
using namespace KSieveUi; using namespace KSieveUi;
...@@ -37,10 +38,10 @@ SelectFlagsListDialog::SelectFlagsListDialog(QWidget *parent) ...@@ -37,10 +38,10 @@ SelectFlagsListDialog::SelectFlagsListDialog(QWidget *parent)
{ {
setWindowTitle(i18n("Flags")); setWindowTitle(i18n("Flags"));
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mListWidget = new SelectFlagsListWidget(this); mListWidget = new SelectFlagsListWidget(this);
mainLayout->addWidget(mListWidget); mainLayout->addWidget(mListWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true); okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
...@@ -145,7 +146,8 @@ SelectFlagsWidget::SelectFlagsWidget(QWidget *parent) ...@@ -145,7 +146,8 @@ SelectFlagsWidget::SelectFlagsWidget(QWidget *parent)
mEdit->setReadOnly(true); mEdit->setReadOnly(true);
connect(mEdit, &QLineEdit::textChanged, this, &SelectFlagsWidget::valueChanged); connect(mEdit, &QLineEdit::textChanged, this, &SelectFlagsWidget::valueChanged);
lay->addWidget(mEdit); lay->addWidget(mEdit);
QPushButton *selectFlags = new QPushButton(i18n("..."), this); QToolButton *selectFlags = new QToolButton(this);
selectFlags->setText(i18n("..."));
connect(selectFlags, &QPushButton::clicked, this, &SelectFlagsWidget::slotSelectFlags); connect(selectFlags, &QPushButton::clicked, this, &SelectFlagsWidget::slotSelectFlags);
lay->addWidget(selectFlags); lay->addWidget(selectFlags);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment