摘要:
Qt的使用这个函数处理信号 void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_index, void **argv) 多线程情况下: 直连或者队列连接使用 queued_activate()处 阅读全文
摘要:
在声明信号的时候,Qt 会将信号于 QMetaThod 进行绑定,当emit 一个信号的时候, 会调用一个 QMetaMethod::invoke 函数。 查看源码, 在qmetaobject.h 中看到一个函数: bool QMetaMethod::invoke(QObject *object, 阅读全文
摘要:
声明: QThread* thread; 初始化: thread = new QThread(); thread->start();将对象放到线程中去: moveToThread(thread); readTimer.moveToThread(thread); readTimer.setSingle 阅读全文
摘要:
Qdebug 重定向 阅读全文
摘要:
Qt 使用ini 文件进行配置 阅读全文
摘要:
Qt 中将std::cout 重定向到 qDebug 阅读全文
摘要:
#include <QCoreApplication>#include <QThread>#include <QDebug>#include <QMutex>#include <QWaitCondition>QMutex mutex;QWaitCondition readCondition;QWai 阅读全文
摘要:
```cpp#include <QCoreApplication>#include <QThread>#include <QMutex>#include <QWaitCondition>#include <QDebug>QMutex mutex;QWaitCondition condition;bo 阅读全文
摘要:
static inline bool is_ident_char(char s) { return ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z') || (s >= '0' && s <= '9') || s == '_' ); } static 阅读全文
摘要:
互斥 peterson -解法。
2个线程,C表示 阅读全文