Truc moins moche V2 (I'm a teapot BORDEL DE MERDE 418 aled il est 1h45)

This commit is contained in:
2024-05-09 01:47:32 +02:00
parent 7ed98839ad
commit 81fd0875a3
2 changed files with 8 additions and 1 deletions

View File

@@ -3,7 +3,11 @@
InGame::InGame(QWidget *parent) : QWidget(parent) {
this->mainLayout = new QVBoxLayout(this);
this->mainLayout->setAlignment(Qt::AlignCenter);
this->setStyleSheet("background-image: url(:/img/ISEN-Nantes.png); background-repeat: no-repeat; background-position: center; background-color: white; background-size: auto 56%;");
QPixmap bgPixmap(":/img/ISEN-Nantes.png");
bgPixmap = bgPixmap.scaled(this->size(), Qt::KeepAspectRatioByExpanding);
QPalette palette;
palette.setBrush(QPalette::Window, QBrush(bgPixmap));
this->setPalette(palette);
this->pts = new QLabel("Points : 0", this);
this->pts->setStyleSheet("font-size: 96px; color: black;");
this->x = new QLabel("X : 0", this);

View File

@@ -3,6 +3,9 @@
#include <QVBoxLayout>
#include <QWidget>
#include <QTimer>
#include <QPixmap>
#include <QPalette>
#include <QBrush>
class InGame : public QWidget {
Q_OBJECT