Add close buttons to all dialogs

This commit is contained in:
Konstantinos Sideris 2018-09-21 13:56:39 +03:00
parent 2a2b52e07f
commit b0e3a7c7fa
4 changed files with 37 additions and 0 deletions

View file

@ -95,8 +95,16 @@ MemberList::MemberList(const QString &room_id, QWidget *parent)
topLabel_->setAlignment(Qt::AlignCenter);
topLabel_->setFont(font);
auto okBtn = new QPushButton("OK", this);
auto buttonLayout = new QHBoxLayout();
buttonLayout->setSpacing(15);
buttonLayout->addStretch(1);
buttonLayout->addWidget(okBtn);
layout->addWidget(topLabel_);
layout->addWidget(list_);
layout->addLayout(buttonLayout);
list_->clear();
@ -125,6 +133,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent)
auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this);
connect(closeShortcut, &QShortcut::activated, this, &MemberList::close);
connect(okBtn, &QPushButton::clicked, this, &MemberList::close);
}
void