Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "board.h"
- #include "ui_board.h"
- #include <QPainter>
- #include <QBrush>
- board::board(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::board)
- {
- ui->setupUi(this);
- }
- board::~board()
- {
- delete ui;
- }
- void board::drawBoard()
- {
- QPainter boardPainter(this);
- QBrush boardBrush;
- int boardWidth = this->width();
- int boardHeight = this->height();
- b.setStyle(Qt::SolidPattern);
- b.setColor(Qt::yellow);
- p.setBrush(b);
- p.drawRect(0,0,w-1,h-1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement