D25981: Clean up the chat dialog code a bit, set the keyboard focus on the chat message field
Albert Astals Cid
noreply at phabricator.kde.org
Thu Jan 2 23:53:42 GMT 2020
aacid added a comment.
Does something like this fix the problem?
diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp
index 0b7ec1d..35a9ffe 100644
--- a/src/chatdlg.cpp
+++ b/src/chatdlg.cpp
@@ -50,11 +50,10 @@ ChatDlg::ChatDlg(KGame *game,QWidget *parent)
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
- okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
- okButton->setDefault(true);
+ okButton->setAutoDefault(false);
setModal(false);
setMinimumSize(QSize(200,200));
@@ -68,6 +67,7 @@ ChatDlg::ChatDlg(KGame *game,QWidget *parent)
mGridLayout->addWidget(b,0,0);
QPushButton *mButton = new QPushButton(i18n("Configure..."),frame);
+ mButton->setAutoDefault(false);
mGridLayout->addWidget(mButton,1,1);
mainLayout->addWidget(frame);
REPOSITORY
R395 KFourInLine
REVISION DETAIL
https://phabricator.kde.org/D25981
To: yurchor, #kde_games
Cc: aacid, kde-games-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20200102/ec19b9e7/attachment.html>
More information about the kde-games-devel
mailing list