fix ibus focus losing behavior (#142)

This commit is contained in:
Cyano Hao 2023-10-18 21:52:58 +08:00 committed by GitHub
parent 5de495e43b
commit 0bb941e7fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -48,6 +48,7 @@ CodeCompletionPopup::CodeCompletionPopup(QWidget *parent) :
setLayout(new QVBoxLayout());
layout()->addWidget(mListView);
layout()->setMargin(0);
mListView->setFocus();
mShowKeywords=true;
mRecordUsage = false;
@ -1111,11 +1112,6 @@ const QString &CodeCompletionPopup::memberPhrase() const
return mMemberPhrase;
}
void CodeCompletionPopup::showEvent(QShowEvent *)
{
mListView->setFocus();
}
const PStatement &CodeCompletionPopup::currentScope() const
{
return mCurrentScope;

View File

@ -194,7 +194,6 @@ private:
// QWidget interface
protected:
void showEvent(QShowEvent *event) override;
void hideEvent(QHideEvent *event) override;
// QObject interface