在用QComboBox的时候,清除所有的item用的是clear(),可是会把QComboBox也给清掉(Combo消失了)。查QT助手,写的是
void QComboBox::clear () [slot]
Clears the combobox, removing all items.
Note: If you have set an external model on the combobox this model will still be cleared when calling this function.
那么如何才能重新设置QComboBox的model来只让清除item呢?
或者有什么更好的方法来清理所有的item呢?