QComboBox

inline void QComboBox::addItem(const QIcon &aicon, const QString &atext, const QVariant &auserData) //添加到最后
QWidget *Widget = new QWidget;

QComboBox *ComboBox = new QComboBox;
ComboBox->setEditable(true);
ComboBox->insertItem(0, "object");
ComboBox->insertItem(1, "instance");

QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(ComboBox);

Widget->setLayout(layout);
Widget->show();

QComboBox

posted @ 2017-05-07 13:02  thomas_blog  阅读(103)  评论(0编辑  收藏  举报