diff --git a/RedPandaIDE/widgets/codecompletionpopup.cpp b/RedPandaIDE/widgets/codecompletionpopup.cpp index 5ab25df8..454cbad1 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.cpp +++ b/RedPandaIDE/widgets/codecompletionpopup.cpp @@ -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; diff --git a/RedPandaIDE/widgets/codecompletionpopup.h b/RedPandaIDE/widgets/codecompletionpopup.h index 303f1ddf..6f299a81 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.h +++ b/RedPandaIDE/widgets/codecompletionpopup.h @@ -194,7 +194,6 @@ private: // QWidget interface protected: - void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; // QObject interface