Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
4.6.2
-
None
-
Debian Squueze, Qt 4.6.2, gcc 4.4
Description
Consider the folowing example:
QComboBox *bb = new QComboBox; QLineEdit *lb = new QLineEdit; bb->setDuplicatesEnabled(false); bb->setEditable(true); bb->setLineEdit(lb); bb->addItem("1"); bb->addItem("2"); bb->addItem("3"); bb->setStyleSheet("QComboBox{color:cyan}"); lb->setStyleSheet("QLineEdit{color:magenta}"); bb->show();
QComboBox should have "color" set to "cyan", and QLineEdit should have "color" set to "magenta". But if I compile and run this example, text in QLineEdit will have "cyan" color. If I remove "bb->setStyleSheet("QComboBox");", QLineEdit will have "magenta" color as expected. It seems that QComboBox replaces QLineEdit's style.
Attachments
Issue Links
- is replaced by
-
QTBUG-4322 Stylesheet ignored after calling QComboBox::setLineEdit
- Open
- relates to
-
QTBUG-4322 Stylesheet ignored after calling QComboBox::setLineEdit
- Open