开发者

Stylesheet control for QComboBox tick?

I have a nice stylesheet for a QComboBox but I can't find how to style the tick.

The tick is a graphic that a开发者_StackOverflowppears next to the currently selected item. There are two problems: 1. When the mouse is on the currently selected item, the selection-background-color is applied to the item but not the tick. 2. When another item is highlighted the tick is drawn disabled with an ugly stipple effect.

I guess it's somewhere under QComboBox::on but I don't know what it is.


The important control appears to be QComboBox::checked. Make sure to set color and background-color. Background colour cannot be a gradient. If background colour is set to the same as the rule for QComboBox QAbstractItemView then the chess board effect (stippling) can be avoided.


If you set the general style using:

#include <QCleanlooksStyle>

QCleanlooksStyle cleanLook;
QComboBox * combo = new QComboBox;
combo->setStyle(&cleanLook);

then the check marks aren't shown at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜