Qt-interest Archive, April 2007
custom painting in QComboBox
Message 1 in thread
Dear All,
i'd like to make a combo box, which instead of text displays just icon
with predefined hatch style. I've already tested
setting the icon with no text, this works, but the icon is small. I'd
like to have icon as big as the qcombobox interior is (say -4 pixels or
so from each side).
By looking at QStylePainter I've found that I cannot inherit and
reimplement drawControl because it is the function is not virtual. So
far I didn't find
any correct method how to do it. I have another idea, reimplement
QStyle::drawControl, and during construction of combo call setStyle to
force it
to use my style, but in qt's assistant it is said that this is not a
recommended method.
What is then _the_ recommended method?
thanks
d.
--
[ signature omitted ]