mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Support for key_up and down in the combobox delegate.
Adds spport for key_up and key_down in the combobox delegates, now when you press key_up or down, it will show the list of choices instead of going one-by-one in the lineedit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
ee25edc28e
commit
c5a0c4e0d7
2 changed files with 23 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#define MODELDELEGATES_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
class QComboBox;
|
||||
|
||||
class StarWidgetsDelegate : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
|
@ -20,8 +21,10 @@ public:
|
|||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
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);
|
||||
protected:
|
||||
QAbstractItemModel *model;
|
||||
QComboBox *comboBox; // warning - it's null everytime a edit's finished.
|
||||
};
|
||||
|
||||
class TankInfoDelegate : public ComboBoxDelegate{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue