Important: Please read the Qt Code of Conduct -

Qt and Posix timers

  • Hi everyone, it is the first time I write here and I hope you can help me.

    I am developing a program, 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.


  • Try to post some piece of code to make your question more clear.

    There is no problems with signals and QTimers are good.

    See if you have some loop that could make the UI get frozen.

Log in to reply