[Interest] Hide icon in a QComboBox associated with a Model

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Fri Aug 23 17:01:56 CEST 2013


Dear all,

I have a model representing the objects loaded in my app. This model
provides icons for the IconRole, so that the object list docking widget
looks nice.

In another control, I want to link a QComboBox with the model. This works
very well as the QComboBox updates itself with the model updates with no
additionnal code.

I want to hide the icons in the QComboBox. I can find no functions for
disabling them, setting the size to 0 is a workaround, but a space remains
before the text, which looks not so nice (maybe some non-zero layout
spacing which remains, even if the icon widget is zero-sized)

Is there any better and simple option? Maybe adding a hideIcons() feature
in QComboBox would help.

Thanks,

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130823/90f251ef/attachment.html>


More information about the Interest mailing list