c++ - Is it possible to disable an entry in QComboBox -


i adding items qcombobox such

ui.combobox->additem("someitema"); ui.combobox->additem("someitemb"); 

i wanted know if there way disable items in qcombobox such not selectable. using qt5

try

qobject_cast< qstandarditemmodel * >( ui.combobox->model() )->item( 0 )->setenabled( false ) 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -