gui: Enable console line edit on setClientModel

This commit is contained in:
João Barbosa 2019-05-29 22:53:25 +01:00
parent 76e2cded47
commit 2d8ad2f997
2 changed files with 6 additions and 0 deletions

View file

@ -636,6 +636,9 @@
<property name="placeholderText">
<string/>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>

View file

@ -677,6 +677,9 @@ void RPCConsole::setClientModel(ClientModel *model)
wordList.sort();
autoCompleter = new QCompleter(wordList, this);
autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
// ui->lineEdit is initially disabled because running commands is only
// possible from now on.
ui->lineEdit->setEnabled(true);
ui->lineEdit->setCompleter(autoCompleter);
autoCompleter->popup()->installEventFilter(this);
// Start thread to execute RPC commands.