Wim
4th December 2007, 05:22
I am using Qt version 4.3.1
I create a QComboBox with the QComboBox::AdjustToContents property set. The problem is that the size of the combobox is not adjusted when I change the model with setModel() after the combobox is displayed. Calling update() or adjustSize() after setModel() also do not work.
The only thing that seems to work is to insert and remove a dummy item, but that doesn't look very smart...
Can anyone tell me if there is a better way to tell QComboBox to adjust its size after a model change?
Thanks in advance.
I create a QComboBox with the QComboBox::AdjustToContents property set. The problem is that the size of the combobox is not adjusted when I change the model with setModel() after the combobox is displayed. Calling update() or adjustSize() after setModel() also do not work.
The only thing that seems to work is to insert and remove a dummy item, but that doesn't look very smart...
Can anyone tell me if there is a better way to tell QComboBox to adjust its size after a model change?
Thanks in advance.