Remove dotted border around combo box items
-
so perhaps you could use :
@QComboBox::selected:item { border: 0px solid black }@
or
@QAbstractScrollArea::selected:item { border: 0px solid black }@
-
how do apply the above style on QComboBox QAbstractItemView?
-
For a first try, create a file named "my_style.qss", put the previous line inside, then simply launch your application with:
@myApplication -stylesheet my_style.qss@
NB : QAbstractItemView is an QAbstractScrollArea.
-
Is there a way i can apply the style directly in style file?
-
you can do that via q QStyle implementation, but I think, the focus rectangle (which is in fact the problem here) can't be modified via style sheet.
-
Is there some way through or something else so i can the border invisible or hide it so it does not show?
-
AFAIK not ...
-
Maybe topicstarter already has resolved this problem, but I found solution:
QComboBox QAbstractItemView {
outline: 0px;
}this stylesheet deletes dotted border.
Maybe it helps someone. -
i overwrite QApplication and use your code:
@this->setStyleSheet("QComboBox QAbstractItemView { outline: 0px;}");@
but the outline still there. Plz help -
It worked for me, thank you very much arybnikov.
-
Thank you "arybnikov" this worked for me as well :)