#include "AboutView.h" #include "AppInfoWidget.h" #include #include #include #include AboutView::AboutView(QWidget *parent) : QWidget(parent) { initialize(); initLayout(); setWindowTitle("关于"); } void AboutView::paintEvent(QPaintEvent *event) { QWidget::paintEvent(event); QPainter painter(this); QPixmap pixmap(":/resource/background/1.jpg"); painter.drawPixmap(0, 0, pixmap.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation)); } void AboutView::initialize() { m_vBoxLayout = new QVBoxLayout(this); m_appInfoWidget = new AppInfoWidget(this); } void AboutView::initLayout() { m_vBoxLayout->addWidget(m_appInfoWidget); }