diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-16 19:13:58 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-16 19:13:58 -0300 |
commit | 1a0a4b7e08df29dcc519dfe35022127e1d5dda20 (patch) | |
tree | 44bb39a5ac166345b5fea20af0d222a49ccd4cf2 /qt-ui/modeldelegates.h | |
parent | c5a0c4e0d7f69be9341cc5c8815afe9761e5c47c (diff) | |
download | subsurface-1a0a4b7e08df29dcc519dfe35022127e1d5dda20.tar.gz |
Fixes the Combobox behavior on the inline-edit
This patch fixes the combobox behavior on the inline edit
to what it was ( well, similar to ) the GTK version,
up and arrow keys will walk you to the list of choices,
and it will update the other data as soon as you walks over it
one drawback is that you cant ( for now, since I do have a
very big headache at the moment ) cancel, since the cancel
will just forgets the item and do not call 'setData' on the
model, but we already called it while walking on the list.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r-- | qt-ui/modeldelegates.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h index e57c8729f..7de676c6c 100644 --- a/qt-ui/modeldelegates.h +++ b/qt-ui/modeldelegates.h @@ -22,9 +22,10 @@ public: virtual void setEditorData(QWidget* editor, const QModelIndex& index) const; virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; virtual bool eventFilter(QObject* object, QEvent* event); +public slots: + void testActivation(const QString& s); protected: QAbstractItemModel *model; - QComboBox *comboBox; // warning - it's null everytime a edit's finished. }; class TankInfoDelegate : public ComboBoxDelegate{ |