#include "downloadhistory.h" #include "ui_downloadhistory.h" DownLoadHistory::DownLoadHistory(QWidget *parent) : QWidget(parent), ui(new Ui::DownLoadHistory) { ui->setupUi(this); vblayout = new QVBoxLayout(this->ui->scrollAreaWidgetContents); vblayout->addStretch(1); } DownLoadHistory::~DownLoadHistory() { delete ui; } void DownLoadHistory::addElement(DownloadHistoryElement *element) { if(element) this->vblayout->insertWidget(0,element); } void DownLoadHistory::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: ui->retranslateUi(this); break; default: break; } }