42 QComboBox::paintEvent(pe);
44 QStyleOptionComboBox option;
45 option.initFrom(
this);
46 option.frame = hasFrame();
47 QRect
rect = style()->subControlRect(QStyle::CC_ComboBox, &option, QStyle::SC_ComboBoxEditField,
this);
49 rect.adjust(-14, 0, 14, 1);
52 QPainter painter(
this);
53 bool antialiasing = painter.testRenderHint(QPainter::Antialiasing);
55 painter.setRenderHint(QPainter::Antialiasing,
true);
58 if (!(option.state & QStyle::State_Enabled)) {
59 painter.setOpacity(0.5);
61 QPen pen(Qt::black, 2);
66 painter.setRenderHint(QPainter::Antialiasing,
false);