28 QComboBox *editor =
new QComboBox(parent);
29 editor->addItem(
"lines");
30 editor->addItem(
"steps");
31 editor->addItem(
"impulses");
32 editor->addItem(
"None");
33 editor->setCurrentIndex(0);
39 QString value = index.model()->data(index, Qt::EditRole).toString();
41 QComboBox *cBox =
static_cast<QComboBox *
>(editor);
42 cBox->setCurrentIndex(cBox->findText(value));
47 QComboBox *cBox =
static_cast<QComboBox *
>(editor);
48 QString value = cBox->currentText();
50 model->setData(index, value, Qt::EditRole);
55 editor->setGeometry(option.rect);