<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QThread or QTimer]]></title><description><![CDATA[<p dir="auto">Hi, I'm writing a GUI programme that receives and sends some data through serial port.</p>
<p dir="auto">I'm using the approach showed in the Qt documentation where data is read when a readyRead signal is emitted, and I do this in the mainwindow.</p>
<p dir="auto">But now, I want to write data every 50 ms, so I thought about using the QTimer class. However I don't know if this is a good idea. Besides, I've read that it's a better advice to do this kind of processing in a separated thread, in the background, and leave the UI for simpler tasks.</p>
<p dir="auto">So, which approach do you think it's a better practice?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.qt.io/topic/54709/qthread-or-qtimer</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 14:44:22 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/54709.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 May 2015 21:56:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QThread or QTimer on Fri, 29 May 2015 06:03:59 GMT]]></title><description><![CDATA[<p dir="auto">I use qml to make it work.WorkerScript</p>
]]></description><link>https://forum.qt.io/post/275925</link><guid isPermaLink="true">https://forum.qt.io/post/275925</guid><dc:creator><![CDATA[tommego]]></dc:creator><pubDate>Fri, 29 May 2015 06:03:59 GMT</pubDate></item><item><title><![CDATA[Reply to QThread or QTimer on Fri, 29 May 2015 03:13:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi. I think it's all right to use a QTimer, because QSerialPort is a buffered device. Calling the write method will not block your main thread. Give it a try. If you feel some performance decrease, then you may start considering using threads.</p>
]]></description><link>https://forum.qt.io/post/275923</link><guid isPermaLink="true">https://forum.qt.io/post/275923</guid><dc:creator><![CDATA[Leonardo]]></dc:creator><pubDate>Fri, 29 May 2015 03:13:27 GMT</pubDate></item></channel></rss>