PDA

View Full Version : QComboBox not showing all items



musikit
10th April 2008, 15:24
hello,

i have a list of items (approx 800 long) i am filling a combo box with. however the list seems to truncate in the actual displayed GUI by a large amount.

it shows items A-P however will show no items past P. is there a way to increase the size of listed items so i can get all A-Z?

i have tried setting the property maxVisibleItems and maxCount with no success.

any help would be very appreciated.

Lykurg
10th April 2008, 15:36
Hi,

can you provide a sample code? How do you pass the items to the combobox? if using a model -> fetchMore()? Is your list strait before inserting correct?

Lykurg

musikit
10th April 2008, 15:51
void MyObj::FillComboBox(const std::vector<std::string> &items)
{
for(size_t i = 0 ; i < items.size() ; i++)
{
cmbItems->addItem(QString::fromUtf8(items[i].c_str()));
}

fprintf(stdout, "items count %d\n", items.size());
fprintf(stdout, "cmb item count %d\n", cmbItems->count());
}
------------------------------------------
item count 829
cmb item count 829

again the actual UI displays A-P and then stops.

musikit
10th April 2008, 16:01
i appologize. an xml parse error was effecting my algorithm for adding items into the combo box.