1234567891011121314151617 |
- #include "AboutView.h"
- #include <QPainter>
- AboutView::AboutView(QWidget *parent) : QWidget(parent)
- {
- setStyleSheet("background-color: rgb(222, 222, 0);");
- }
- 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));
- }
|