Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as C++ by registered user raphael ( 1 year ago )
#ifndef PUSHBUTTONROUGE_H
#define PUSHBUTTONROUGE_H
 
#include <QPushButton>
 
class PushButtonRouge : public QPushButton
{
public:
    PushButtonRouge(QWidget *parent);
};
 
#endif // PUSHBUTTONROUGE_H
 
#include "pushbuttonrouge.h"
 
PushButtonRouge::PushButtonRouge(QWidget *parent) : QPushButton(parent)
{
    setStyleSheet("background-color: red;");
}
#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 blue, stop:0.5 white, stop:1 red);");

}

MainWindow::~MainWindow()
{
    delete ui;
}

 

Revise this Paste

Your Name: Code Language: