mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
Close completer popup on clear
This commit is contained in:
parent
a8418e3b53
commit
bdd308d183
@ -4,6 +4,8 @@
|
||||
#include <QStringListModel>
|
||||
#include <QCompleter>
|
||||
#include <QShortcut>
|
||||
#include <QAbstractItemView>
|
||||
|
||||
|
||||
Omnibar::Omnibar(MainWindow *main, QWidget *parent) :
|
||||
QLineEdit(parent),
|
||||
@ -84,6 +86,15 @@ void Omnibar::showCommands()
|
||||
completer->complete();
|
||||
}
|
||||
|
||||
void Omnibar::clear()
|
||||
{
|
||||
QLineEdit::clear();
|
||||
|
||||
// Close the potential shown completer popup
|
||||
clearFocus();
|
||||
setFocus();
|
||||
}
|
||||
|
||||
void Omnibar::on_gotoEntry_returnPressed()
|
||||
{
|
||||
QString str = this->text();
|
||||
|
@ -20,6 +20,7 @@ private slots:
|
||||
|
||||
public slots:
|
||||
void showCommands();
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void setupCompleter();
|
||||
|
Loading…
Reference in New Issue
Block a user