Qt实现透明窗体画线
通过电磁笔在签字版上实现透明窗体签字,带压感,支持mac、windows、linux,
窗体设置
//设置无边界窗口并置顶
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
setMouseTracking(true);
//窗口设置透明
setAttribute(Qt::WA_TranslucentBackground,true);
setFixedSize(1280,800);
笔迹画线
void MainWindow::paintEvent(QPaintEvent *event)
{
QPainter painter(