PDA

View Full Version : How to set Text Elide Mode for QComboBox



kalos80
25th February 2011, 12:49
Is there a way to set the text elide mode for the text shown in a QComboBox (not the popup list)?

It is possible to set it for items in the popup list


myCmb->view()->setTextElideMode()

but I did not find any way to set it for the text shown in the QComboBox.

Thanks in advance for your help

wysota
27th February 2011, 09:42
Reimplement QComboBox::paintEvent() and adjust the text after call to initStyleOption().