PDA

View Full Version : Contents not Properly Visible in QComboBox



merry
25th September 2007, 13:09
Hi all

Working on Qt4.1 on my Intel Mac machine.

My problem is this , The length of the QComboBox is small as compare to the contents in it, while using this in my program i wont be able to view its contents properly.

For eg. Suppose I have added this String in QComboBox "/dev/rdisk0 (WDC WD2500AAJS-41RYA0 Media,232.89 GB)",

Now while running the program ,When i click upon combo , The name of the above String is Partiallly visible to me. that is "/dev/rdisk0 (WDC "
Because the length of the ComboBox I have taken is this much.

For this I also used ,Combo->setSizeAdjustPolicy(QComboBox::AdjustToContents); but It wont works

Is there any other way to make it adjustable.

Kindly help me

Thanx

wysota
25th September 2007, 13:21
Did you put the combobox in a proper layout so that it resizes when you resize the window?

merry
25th September 2007, 13:27
Thanx for the reply.

The width of the window is small.

But i dont have to resize the window..,

the size of the window should be fixed , and the Combo Box on it is also fixed ,

wysota
25th September 2007, 13:29
But if you don't put the combobox in a layout, it won't adjust to its contents because its sizeHint will be ignored (it is the layout that controls widget sizes so if you don't have one, your widgets won't adjust to contents).

merry
25th September 2007, 13:32
Thanx for the reply , I 'll try this and then update you