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

View File

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