Im trying to set spacing between the items in QCombobox. for the spacing i used the
1.listview of the combobox and used setSpacing(2) for setting the spaces between the item.
in customCombobox class
QListView * listView = new QListView(this);
listView->setSpacing(3);
this->setView(listView);
listView->setStyleSheet("background: white; \
font-size: 12px,0.2em; \
font-family: Segoe Regular; \
QListView::item { \
color: black; \
margin-top:15px; \
background: white;} \
QListView::item:selected { \
outline: 0px; \
padding-left:8px;\
color: white; \
background-color: #0093D6 \
} \
");
but it is enabling the scrollbar which i want to avoid. i want to show the popUp with items i can able to show without hiding.for showing three items it wont use scrollbar.
- If i do the padding-left in listview item, the selection color block (say red color box) also shifts 8px to left , how to avoid it.
tis is whout spacing and with spacing