19 #include <QAbstractItemView> 46 if (editable != QComboBox::isEditable()) {
47 QComboBox::setEditable(editable);
53 connect(lineEdit(), SIGNAL(editingFinished()),
this,
70 bool doComplete = (count() >= 0);
73 switch (event->key()) {
92 bool isShortcut = (
event->modifiers() & Qt::ControlModifier) &&
93 (event->key() == Qt::Key_E);
94 bool ctrlOrShift =
event->modifiers() &
95 (Qt::ControlModifier | Qt::ShiftModifier);
98 QComboBox::keyPressEvent(event);
100 if (!isShortcut && !ctrlOrShift && (event->modifiers() != Qt::NoModifier)) {
118 lineEdit()->selectAll();
120 setCurrentIndex(findText(text));
127 int index = findText(currentText());
130 setEditText(currentText());
132 setCurrentIndex(index);
MatchFilterCompleter * matchFilterCompleter_
virtual ~MatchFilterComboBox()
void setEditable(bool editable)
void lineEditEditingFinished()
void keyPressEvent(QKeyEvent *event)
MatchFilterCompleter * getMatchFilterCompleter() const
MatchFilterComboBox(QWidget *parent=0)
void matchFilterCompleterActivated(const QString &text)