QT Combo Box of Line Pattern

518 views Asked by At

i want to make a line pattern combo box in Qt same as it is shown in the picture , please tell me is it possible to make a combo box in Qt like shown in the picture. Any help would be appreciated

Regards

enter image description here

1

There are 1 answers

3
Amartel On BEST ANSWER

Easy way:

comboBox->setIconSize(QSize(100, 24));
comboBox->addItem(lineIcon, "");
comboBox->addItem(dotLineIcon, "");
comboBox->addItem(dashLineIcon, "");
...

Correct way:

comboBox->setItemDelegate(...);