PDA

View Full Version : QStyle : combox - how to remove the "focus rectangle" around the items



pl01
29th April 2013, 12:26
Hi,

I have my own style and redefine the combobox style with CC_ComboBox, but I can't hide the "focus" around the selected combo box item ?

1) I don't know how to redefine theses items with the QStyle
2) Even playing by the stylesheet will be a solution

Does someone has an idea ?

Thx

Lykurg
29th April 2013, 15:51
Every time I forget what it is exactly... But it sounds like the solution for your problem is QStyle::State_HasFocus, or better say: it is the "problem". Remove this flag before calling the base painting methods then the dotted line should disappear.