#include "AboutView.h" #include "AppInfoWidget.h" #include #include #include #include AboutView::AboutView(QWidget *parent) : QWidget(parent) { // setStyleSheet("background-color: rgb(222, 222, 0);"); initialize(); initLayout(); } 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->setAlignment(Qt::AlignCenter); m_vBoxLayout->addWidget(m_appInfoWidget); }