Results 1 to 2 of 2

Thread: Qt and posix timers

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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, 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.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt and posix timers

    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?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QLabel + timers
    By prophet0 in forum Qt Programming
    Replies: 4
    Last Post: 26th March 2012, 17:57
  2. QFileInfo::created() Problem Under POSIX!!
    By Mans in forum Qt Programming
    Replies: 3
    Last Post: 16th May 2011, 03:34
  3. POSIX/Win32 Port involving QProcess, QSharedMemory
    By sfabel in forum Qt Programming
    Replies: 0
    Last Post: 16th July 2010, 00:00
  4. Problem with qextserialport on posix
    By bnilsson in forum Qt Programming
    Replies: 0
    Last Post: 13th June 2009, 17:12
  5. Launching and handling posix or win32 signals
    By Althor in forum Qt Programming
    Replies: 2
    Last Post: 20th November 2008, 08:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.