How to remove arrow from QCombobox popup?
I have a QComboBox that shows a default select arrow on the left when clicked - the snapshot attached below.
My stylesheet is below
#define PROFILE_PAGE_COMBOBOX_CSS_ACTIVE " \
QComboBox { \
background:white; \
border:1px solid gray \
} \
QComboBox::down-arrow { \
image: url(:/images/profilecomboboxdropdown.png); width:15px; height: 15px; \
} \
QComboBox::drop-down { \
subcontrol-origin: padding; \
subcontrol-position: right; \
width: 15px; \
height: 15px; \
border:0px; \
padding-right:8px; \
} \
QComboBox QAbstractItemView { \
border: 0px; \
padding: 1px; \
background-color: #ffffff; \
color: gray; \
selection-background-color: #ffffff; \
selection-color: blue; \
} \
"
this->m_CountryEdit->setStyleSheet(PROFILE_PAGE_COMBOBOX_CSS_ACTIVE);
How can I get rid of this selection arrow? I am using Qt 4.7.4 on Mac and Windows
+3
source to share
1 answer
This is a Mac-specific issue and there are several ways to live with it - make the selection mark to jump out of the screen with positioning styles - make it less ugly by removing the border (this is a matter of removing the style that makes that border show) - so don't set the "current" item in the combo box probably
0
source to share