How to control the text truncation in QComboBox?
-
Hello All,
I have a quick question about text truncation behavior in QComboBox in Pyqt on Windows.
I don't know why, but the middle part of my texts are truncated like ABCDEF....XYZ.
Is it possible to achieve something like ...ABCDEFGHIJK(not middle) or ABCDEFGHIJK(ignore longer part).First, I thought QComboBox should have setElideText function but there's no such function.
Many thanks in advance for your help.
Regards,
Sat -
That is just a
QListViewyou can usecombo.view().setTextElideMode()or set your own delegate on it to paint as you want it