会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
日常打盹
博客园
首页
新随笔
联系
订阅
管理
2024年5月13日
Qt 信号槽连接方式
摘要: Qt的使用这个函数处理信号 void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_index, void **argv) 多线程情况下: 直连或者队列连接使用 queued_activate()处
阅读全文
posted @ 2024-05-13 19:37 愿得入睡
阅读(42)
评论(0)
推荐(0)
2023年8月24日
Qt 信号槽连接源码解读
摘要: 在声明信号的时候,Qt 会将信号于 QMetaThod 进行绑定,当emit 一个信号的时候, 会调用一个 QMetaMethod::invoke 函数。 查看源码, 在qmetaobject.h 中看到一个函数: bool QMetaMethod::invoke(QObject *object,
阅读全文
posted @ 2023-08-24 00:01 愿得入睡
阅读(443)
评论(0)
推荐(0)
2023年8月21日
Qt 多线程简单应用
摘要: 声明: QThread* thread; 初始化: thread = new QThread(); thread->start();将对象放到线程中去: moveToThread(thread); readTimer.moveToThread(thread); readTimer.setSingle
阅读全文
posted @ 2023-08-21 23:13 愿得入睡
阅读(23)
评论(0)
推荐(0)
2023年6月15日
Qt Qdebug 实现重定向到文件
摘要: Qdebug 重定向
阅读全文
posted @ 2023-06-15 13:28 愿得入睡
阅读(213)
评论(0)
推荐(0)
2023年5月31日
Qt 使用ini 配置文件
摘要: Qt 使用ini 文件进行配置
阅读全文
posted @ 2023-05-31 23:57 愿得入睡
阅读(153)
评论(0)
推荐(0)
2023年5月27日
Qt 中将std::cout 重定向到 qDebug
摘要: Qt 中将std::cout 重定向到 qDebug
阅读全文
posted @ 2023-05-27 09:34 愿得入睡
阅读(551)
评论(0)
推荐(0)
2023年5月24日
读者-写者问题Qt 解
摘要: #include <QCoreApplication>#include <QThread>#include <QDebug>#include <QMutex>#include <QWaitCondition>QMutex mutex;QWaitCondition readCondition;QWai
阅读全文
posted @ 2023-05-24 08:44 愿得入睡
阅读(22)
评论(0)
推荐(0)
2023年5月22日
条件变量和 互斥量实现 数据互斥访问
摘要: ```cpp#include <QCoreApplication>#include <QThread>#include <QMutex>#include <QWaitCondition>#include <QDebug>QMutex mutex;QWaitCondition condition;bo
阅读全文
posted @ 2023-05-22 14:07 愿得入睡
阅读(53)
评论(0)
推荐(0)
2023年5月21日
字符串解析函数 - qRemoveWhitespace 移除字符串中的空白符(空格、制表符、换行符等),但保留一些语义相关的空格
摘要: static inline bool is_ident_char(char s) { return ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z') || (s >= '0' && s <= '9') || s == '_' ); } static
阅读全文
posted @ 2023-05-21 07:37 愿得入睡
阅读(64)
评论(0)
推荐(0)
2023年5月19日
互斥算法-peterson解法
摘要: 互斥 peterson -解法。 2个线程,C表示
阅读全文
posted @ 2023-05-19 09:29 愿得入睡
阅读(56)
评论(0)
推荐(0)
下一页
公告