8 : QComboBox(parent), role(Qt::UserRole) {
11 static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
16 return itemData(currentIndex(),
role);
20 setCurrentIndex(findData(value,
role));
QValueComboBox(QWidget *parent=nullptr)
void handleSelectionChanged(int idx)
void setValue(const QVariant &value)
void setRole(int role)
Specify model role to use as ordinal value (defaults to Qt::UserRole)