Qt (4.6) online documentation has this to say about QComboBox
:
enum SizeAdjustPolicy { AdjustToContents, AdjustToContentsOnFirstShow, AdjustToMinimumContentsLength, AdjustToMinimumContentsLengthWithIcon }
I would suggest
-
ensuring the
SizeAdjustPolicy
is actually being used -
setting the enum to
AdjustToContents
. As you mention a.ui
file I suggest doing that in Designer. Normally there shouldn’t be anything fancy in your constructor at all concerning things you do in Designer.