Form1::Form1(QWidget *parent) :
QDialog(parent),
ui(new Ui::Form1)
{
ui->setupUi(this);
QComboBox * cbb_1 = new QComboBox(this);
cbb_1->view()->setFixedWidth(100); //内容宽
// cbb_1->setFixedWidth(100);//控件宽
cbb_1->setGeometry(rect().x()+200, rect().y()+10,
100, 30); //坐标 高 宽
for(int i; i< 20; i++){
cbb_1->addItem(QString::asprintf("Item %d",i));
}
}