<?xml version="1.0" encoding="gbk"?>
<rss version="2.0">
<channel>
 <title><![CDATA[关于在qt中使用pthread的一个问题]]></title>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864]]></link>
 <description><![CDATA[Latest 20 replies of 关于在qt中使用pthread的一个问题]]></description>
 <copyright><![CDATA[Copyright(C) ]]></copyright>
 <generator><![CDATA[PHPWind Forums by PHPWind Studio]]></generator>
 <lastBuildDate><![CDATA[Sun, 26 Jul 2026 21:41:40 +0000]]></lastBuildDate>
  <image>
 <url><![CDATA[images/rss.gif]]></url>
 <title><![CDATA[PHPWind Board]]></title>
 <link><![CDATA[http://121.40.142.80]]></link>
 <description><![CDATA[]]></description>
  </image>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[在编译的时候怎么把-lpthread加进去啊？默认提供的build文件里面好像是没有link pthread的 怎么改build文件啊？ [s:12]]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#233149]]></link>
 <author><![CDATA[刘要发发发发]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Fri, 19 Apr 2013 13:40:10 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[在编译的时候怎么把-lpthread加进去啊？默认提供的build文件里面好像是没有link pthread的 怎么改build文件啊？]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#152464]]></link>
 <author><![CDATA[qqzsxyz]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 23 Feb 2012 10:29:57 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[code]
//线程里发射信号传递一个QString
void thread::run()
{
&nbsp;&nbsp; ...//doing sth
&nbsp;&nbsp; emit setLabelText(&quot;yourString&quot;);
&nbsp;&nbsp;
}

//在主进程中设置信号与槽
connect(&amp;yourThread,SIGNAL(setLabelText(QString)),this,SLOT(setMyLabelText(QString)));

//槽 接收线程发过来的 ..]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#79496]]></link>
 <author><![CDATA[michael.20]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 28 Apr 2011 09:33:43 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[回 5楼(michael.20) 的帖子]]></title>
 <description><![CDATA[我用的线程函数是全局函数，不知道能不能发送信号，可否给个指点？]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78777]]></link>
 <author><![CDATA[cai_buaa]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 08:50:48 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[记得qt在线程中是不能操作UI的··不知道用系统自带的线程也是不是一样。
最好的办法是在线程中发送一个信号，通过信号与槽传递参数给QLabel设置text```]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78773]]></link>
 <author><![CDATA[michael.20]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 08:45:54 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[回 3楼(michael.20) 的帖子]]></title>
 <description><![CDATA[用你的方法搞定了，太谢谢了，现在又出现了新的问题

我在qt中用pthread开了一个线程，循环读取串口数据并处理，处理完了之后要显示在界面上，我在线程函数中调用qt
的QLabel控件Latitude-&gt;setText(&quot;adfaf&quot;);结果发现界面不会自动显示，只有当我把触摸屏一直按下去的时候该控件才会不断更新，这是为什么啊]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78767]]></link>
 <author><![CDATA[cai_buaa]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 08:18:11 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[code]
//换成这个
ret = pthead_create(&amp;id,NULL,(void*)&amp;thread,NULL);

//thread函数换成
void thread(void)
{
}
[/code]

试试这个]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78703]]></link>
 <author><![CDATA[michael.20]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 06:30:31 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[回 1楼(michael.20) 的帖子]]></title>
 <description><![CDATA[qt自带的qthread需要重新编译什么的，超级复杂，弄了好几天都没弄出来，所以就直接用pthread了，不知道你知道这个问题是怎么回事么]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78660]]></link>
 <author><![CDATA[cai_buaa]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 04:19:38 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[qt自带的好用很多吧？ 囧]]></description>
 <link><![CDATA[http://121.40.142.80/read.php?tid=11864#78642]]></link>
 <author><![CDATA[michael.20]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Tue, 26 Apr 2011 03:36:32 +0000]]></pubdate>
</item>
</channel></rss>