I want to crop a text in a QComboBox
. But for this, I need to know the width of a QComboBox. And when I call something like this:
ui->qcombobox->width()
I get incorrect value (actual width is about 260 px but the resulting width is always 100 px).
Questions:
How can I get real width of a QComboBox ?
OR
How can I crop text depends on a QComboBox width?