Qt QListWidget+图标
//ui->listWidget->setViewMode(QListView::IconMode);换行模式
ui->listWidget->setIconSize(QSize(20,20));
QListWidgetItem *item = new QListWidgetItem(QIcon(":/image/zip.ico"),"123.zip");
item->setTextAlignment(Qt::AlignLeft);
//QLineEdit* line = new QLineEdit; //创建部件
//listWidget->setItemWidget(item,line); //添加部件
ui->listWidget->addItem(item);
置灰
ui->listWidget->item(2)->setFlags(ui->listWidget->item(2)->flags() & ~Qt::ItemIsEnabled);