1 #ifndef QVALUECOMBOBOX_H
2 #define QVALUECOMBOBOX_H
7 /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
8 class QValueComboBox : public QComboBox
11 Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true)
13 explicit QValueComboBox(QWidget *parent = 0);
15 QVariant value() const;
16 void setValue(const QVariant &value);
18 /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */
19 void setRole(int role);
30 void handleSelectionChanged(int idx);
33 #endif // QVALUECOMBOBOX_H