You are not logged in.

1

Friday, January 25th 2013, 9:09pm

Hide item in QComboBox

How is possible to hide and show an item in QCombBox?

I found this:

ui->ComboBox->setItemData(i,"DISABLE",Qt::UserRole-1);
to hide,
but i can't find the code to reshow..

2

Friday, February 22nd 2013, 5:05pm

Use

Source code

1
Qt::SizeHintRole
for this purpose. Read more here

3

Friday, September 30th 2016, 12:03pm

Hi, i have the same problem, but this did not work for me

Source code

1
ui->comboBox->setItemData(i, QSize(0,0), Qt::SizeHintRole);


Any suggestion??

Used tags

QCombobox