1、将自定义的widget添加到QlistWidget中
QWidget *widget=new QWidget(this);
QWidget *mainArea = new QWidget(widget);
QWidget *fileinfoWidget = new QWidget(mainArea);
//显示区域的布局
QVBoxLayout *verLayout = new QVBoxLayout();
QHBoxLayout *horLayout = new QHBoxLayout();
QHBoxLayout *fileinfoLayout = new QHBoxLayout();
//主要控件
QLabel *idLabel = new QLabel(widget);
QLabel *textLabel = new QLabel(mainArea);
QLabel *speedLabel = new QLabel(mainArea);
QProgressBar *progressbar = new QProgressBar(mainArea);
QPushButton *giveupButton = new QPushButton(widget);
QLabel *tipLabel1 = new QLabel(widget);
QLabel *tipLabel2 = new QLabel(widget);
QLabel *filesizeLabel = new QLabel(widget);
//设置不同控件的样式
idLabel->setFixedSize(30, 30);
idLabel->setStyleSheet("background:" + currentColor + "; border-radius:15px;color:white;");
idLabel->setText(setFormat(id));
idLabel->setAlignment(Qt::AlignCe