Fixed the Tab behavior on the QCombobox Delegate

This Patch fixes the tab behavior on the QComboBox
delegate. For a QComboBox, tab was being treated as
'cancel' action on edit, but since it will send a
editingFinished() signal, and the Qt::Key_Return
will also send a editingFinished() signal, I couldn't
use that method and had to do a little hack around it.

The code is mostly clean and works.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-10-15 13:45:24 -03:00 committed by Dirk Hohndel
parent 6ccb541f1d
commit 34f2a5ecc7
2 changed files with 18 additions and 1 deletions

View file

@ -27,6 +27,7 @@ public slots:
void testActivation(const QString& currString = QString());
//HACK: try to get rid of this in the future.
void fakeActivation();
void fixTabBehavior();
virtual void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint) = 0;
protected:
QAbstractItemModel *model;