QtNovelUI/u_test/unnnn.cpp

23 lines
557 B
C++
Raw Normal View History

#include "unnnn.h"
2023-08-20 17:22:48 +00:00
#include <QPainter>
2023-08-26 12:40:57 +00:00
using namespace SplitFrame;
2023-08-20 17:22:48 +00:00
XWidget::XWidget(ViewPresent *host, Qt::GlobalColor c, QWidget *parent) : FnWrap<XWidget, false>(host), c_store(c) {}
2023-08-20 17:22:48 +00:00
void XWidget::paintEvent(QPaintEvent *ev) {
QPainter p(this);
2023-08-26 12:40:57 +00:00
p.fillRect(this->rect(), c_store);
2023-08-20 17:22:48 +00:00
}
2023-08-26 12:40:57 +00:00
void XWidget::closeProcess() {}
YWidget::YWidget(ViewPresent *host, QWidget *parent) : FnWrap<XWidget, true>(host) {}
2023-08-26 12:40:57 +00:00
void YWidget::paintEvent(QPaintEvent *ev) {
QPainter p(this);
p.fillRect(this->rect(), Qt::blue);
}
void YWidget::closeProcess() {}