上一页 1 2 3 4 5 6 7 8 9 10 ··· 112 下一页
摘要: #include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { mutex.lock(); std::unique_lock<std::mutex> uniqu 阅读全文
posted @ 2022-08-07 12:47 thomas_blog 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::unique_lock<std::mutex> unique(mutex); std: 阅读全文
posted @ 2022-08-07 12:37 thomas_blog 阅读(37) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::lock_guard<std::mutex> guard(mutex); std::c 阅读全文
posted @ 2022-08-07 12:08 thomas_blog 阅读(68) 评论(0) 推荐(0) 编辑
摘要: #include "widget.h" #include "ui_widget.h" #include <QPicture> #include <QPainter> Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widg 阅读全文
posted @ 2022-08-05 15:08 thomas_blog 阅读(51) 评论(0) 推荐(0) 编辑
摘要: #include "widget.h" #include "ui_widget.h" #include <QPainter> Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widget) { ui->setupUi(th 阅读全文
posted @ 2022-08-05 13:28 thomas_blog 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widget) { ui->setupUi(this); /* 绘图设备 专门为平台做了显示的优化 */ QPixmap pixmap(300, 300); pixmap.f 阅读全文
posted @ 2022-08-04 22:24 thomas_blog 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include "widget.h" #include "ui_widget.h" #include <QDebug> Widget::Widget(QWidget *parent) : QWidget(parent) , ui(new Ui::Widget) { ui->setupUi(this 阅读全文
posted @ 2022-08-04 17:26 thomas_blog 阅读(120) 评论(0) 推荐(0) 编辑
摘要: void paintEvent(QPaintEvent *event) override { QPainter painter(this); painter.drawEllipse(QPoint(100, 100), 50, 50); /* 移动画家 */ painter.translate(QPo 阅读全文
posted @ 2022-08-04 17:05 thomas_blog 阅读(83) 评论(0) 推荐(0) 编辑
摘要: void paintEvent(QPaintEvent *event) override { QPainter painter(this); painter.drawEllipse(QPoint(100, 100), 50, 50); //设置抗锯齿 效率较低 painter.setRenderHi 阅读全文
posted @ 2022-08-04 16:59 thomas_blog 阅读(735) 评论(0) 推荐(0) 编辑
摘要: #ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include <QPainter> QT_BEGIN_NAMESPACE namespace Ui { class Widget; } QT_END_NAMESPACE class Widg 阅读全文
posted @ 2022-08-04 08:19 thomas_blog 阅读(290) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 112 下一页