Quote Originally Posted by æž—å©· View Post
It works!But I wonder if every QComboBox uses "combo->setView(new QListView());",Could it cause memory leak?
No, it couldn't.
The doc says:
Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.
Read about QComboBox::setView carefully.