Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15.2
-
None
Description
When using QSS to set the padding-left property for a QComboBox, it does not affect the positioning of the icon displayed in the combo box (subcontrol CE_ComboBoxLabel). The expected behavior is that increasing the padding-left should move the icon further to the right, but it appears that the icon remains aligned with the left edge of the combo box.
QComboBox *comboBox = new QComboBox(); comboBox->addItem(QIcon(":/path/to/icon1.png"), "Option 1"); comboBox->addItem(QIcon(":/path/to/icon2.png"), "Option 2"); comboBox->addItem(QIcon(":/path/to/icon3.png"), "Option 3"); comboBox->setStyleSheet("QComboBox { padding-left: 20px; }");