PDA

View Full Version : Qt and posix timers



AlbertoXerez
17th August 2012, 10:37
Hi everyone, it is the first time I write here and I hope you can help me.

I am developing a program, in Linux, A, in which I read from a device (server, B) via UDP (using QUdpSocket) make some calculations and send via UDP the results to another Qt program, C, to show them in a little GUI. I have been using Qtimers, and it worked fine but as I need more accuracy I have had to change these timers for posix timers. Now, when I start to send the data from A to C, the GUI in A gets frozen.

If I change the writeDatagram in program A for an: cout << “whatever”; the GUI does not get frozen.

Does anybody know why this happen, is it a problem with the signals? could be a problem for having changed the methods to static? I had to do this because posix timers call static methods.

thanks.

high_flyer
17th August 2012, 12:24
Does anybody know why this happen,
no, how can we?

is it a problem with the signals?
Maybe - but if you use posix timers how did you use them in conjunction with Qt signals/slots?

could be a problem for having changed the methods to static?
It could, but also it could be any number of other things...

I had to do this because posix timers call static methods.
Are we supposed to know why is this important and in what way?