mirror-chatterino2/notebookpage.cpp
2016-12-30 18:00:25 +01:00

21 lines
412 B
C++

#include "QWidget"
#include "QPainter"
#include "notebookpage.h"
#include "notebooktab.h"
NotebookPage::NotebookPage(NotebookTab *tab)
{
this->tab = tab;
tab->page = this;
}
void NotebookPage::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setPen(QColor(255, 0, 0));
painter.drawRect(0, 0, width() - 1, height() - 1);
painter.drawText(8, 8, QString::number(tab->x()));
}