![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
QT
文章平均质量分 76
tommyblue
广州一卡通终端开发qt linux mfc freeRTOS
展开
-
qt信号与槽代替postevent
【转帖请注明出处:blog.csdn.net/lanmanck】 用了qthread后,自然想起给gui线程发送数据。 在qt4中,QCustomEvent已经不使用了。因为qthread是从QObject继承的,所以可以使用signal,slot机制来通信。 1、在线程定义signal: class aa:public QThread { Q_OBJECT ... signals转载 2012-09-26 10:47:13 · 711 阅读 · 0 评论 -
QString和char *的相互转换
如何将QString转换为char *或者相反 How can I convert a QString to char* and vice versa ?(trolltech) Answer: Inorder to convert a QString to a char*, then you first need to get alatin1 representation of th转载 2012-09-17 23:03:27 · 391 阅读 · 0 评论 -
Qt中 QString 和int, char等的“相互”转换
Qt中 int ,float ,double转换为QString 有两种方法 1.使用 QString::number(); 如: long a = 63; QString s = QString::number(a, 10); // s == "63" QString t = QString::number(a, 16).toUpper(转载 2012-10-22 17:12:43 · 491 阅读 · 0 评论 -
判断QButtonGroup中哪个QRadioButton被选中 qobject_cast
博客分类: Qt qobject_castQButtonGroup T qobject_cast ( QObject * object ) 如果object是T类型或者它的子类,就可以把object返回成T类型对象。否则返回0。 类T必须是QObject的子类,而且必须声明宏:Q_OBJECT Example: Cp转载 2012-11-13 21:05:21 · 2445 阅读 · 1 评论 -
QWaitCondition类
QWaitCondition类 2010-07-14 11:37:38| 分类: Qt|字号 订阅 QWaitCondition () virtual ~QWaitCondition () bool wait ( QMutex * mutex, unsigned long time = UL转载 2012-11-13 21:12:19 · 541 阅读 · 0 评论 -
使用qInstallMsgHandler将日志保存到文件
使用qInstallMsgHandler将日志保存到文件 1 在main函数之前定义回调函数 void myMessageOutput(QtMsgType type, const char *msg) { QString text; switch (type) { case QtDebugMsg: text = QStr转载 2012-11-21 10:57:06 · 1879 阅读 · 0 评论 -
Qt加载动态链接库
Qt加载动态链接库 先制作个简单的动态链接库,再在Qt里面加载它。 【制作动态链接库】 先编写一个hello.c 1 #include 2 int hello() 3 { 4 printf("hello world!\n"); 5 } 在Linux下编译,生成hello.o: gcc -c hello.c 编译成动态链接库libhello.so(注意转载 2012-12-13 15:08:47 · 6564 阅读 · 0 评论