diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-04 15:30:50 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-04 15:30:50 (GMT) |
commit | 254fe9c66cefb7be89f1e49111a115c2cdade1af (patch) | |
tree | 85496e62bb68b4cc36f1742eded09811f4ee46de /src/gui | |
parent | c85d2aa7e8d095221e1cc2b4aac2dcd4e9dee775 (diff) | |
parent | 08d1eb4f79b9d633b97987cc55f618e6dd05e291 (diff) | |
download | Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.zip Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.tar.gz Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix combobox backgroundrole not respected in some styles
Allow QtDBus to be compiled as a static library on Windows.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 12b1c4a..664bb46 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -143,7 +143,10 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt menuOption.icon = qvariant_cast<QPixmap>(variant); break; } - + if (qVariantCanConvert<QBrush>(index.data(Qt::BackgroundRole))) { + menuOption.palette.setBrush(QPalette::All, QPalette::Background, + qvariant_cast<QBrush>(index.data(Qt::BackgroundRole))); + } menuOption.text = index.model()->data(index, Qt::DisplayRole).toString() .replace(QLatin1Char('&'), QLatin1String("&&")); menuOption.tabWidth = 0; |