summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-25 16:37:24 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-25 12:48:24 -0700
commite6be14bf104e608f80c9ef1539ea5c51b92793f9 (patch)
tree25800967baf290d7546dd7789a5576d540787d90 /qt-ui/modeldelegates.h
parentbc837163f505a8d9722a0cea5d71ce998b79d7d4 (diff)
downloadsubsurface-e6be14bf104e608f80c9ef1539ea5c51b92793f9.tar.gz
Make the Qt ComboBox behave in a Better Way
So, the ComboBox is a beast, and when used on a Delegate it's very hard to get things right, wich is a pitty, because I overly like qt. So: 1 - Combobox needs to show the popup when user press ↓ and ↑ keys 2 - Combobox needs to select when user press enter, not twice. 3 - Combobox neesds to select when user selects from the mouse, not pressing enter after. 4 - Combobox needs to not mess with stuff when moving around. Everything that I listed there works on a non-delegate combobox, but for some reason, a delegate missed those, so I reimplemented all. not nice, but now we have a code that will work, I hope. *fingers crossed* Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r--qt-ui/modeldelegates.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h
index 29d4f3717..92826ba41 100644
--- a/qt-ui/modeldelegates.h
+++ b/qt-ui/modeldelegates.h
@@ -24,6 +24,8 @@ public:
virtual bool eventFilter(QObject* object, QEvent* event);
public slots:
void testActivation(const QString& s);
+ //HACK: try to get rid of this in the future.
+ void fakeActivation();
virtual void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint) = 0;
protected:
QAbstractItemModel *model;