Real Time Applications in Qt



  • Hello

    I have developed some GUI applications using Qt. But I never worked on advance applications like multithreading and real time applications. So for my reference I need some examples in multithreading and real time. Can I refer Scribble and gtalk application as real time applications?. These are already in Qt Examples. I am not sure which examples I can refer for getting some basic idea.
    Please help give.

    Thanks in advance


  • Moderators

    Do you want "real time" or "high performance"? People often use them interchangeably, but there are important differences (http://en.wikipedia.org/wiki/Real-time_computing#Real-time_and_high-performance )

    Anyway, all applications need to produce correct output, but real time applications also need to produce the output within certain deadlines. So yes, we can consider GTalk, Scribble as real-time apps -- GTalk needs to deliver messages within a few seconds or less; Scribble needs to keep up with my mouse clicks. Another example is audio/video streaming. These are soft real-time programs though, since it's not serious if they miss deadlines sometimes. (If a hard real-time program misses a deadline, it's catastrophic -- e.g. software inside a pacemaker)


  • Moderators

    Very simply, multithreading is just splitting up computation between different CPU cores. It's usually done to improve performance; people usually don't care if a program is single-threaded or multi-threaded or not, unless multi-threading affects the program's performance.

    Any single-threaded program can be made multi-threaded, even a "Hello World" program.

    A simple but incomplete example can be found at http://qt-project.org/forums/viewthread/20691/

    A useful example is at http://blog.qt.digia.com/2010/05/18/qtmultimedia-in-action-a-spectrum-analyser/ -- Analysing audio data takes a long time, so the programmer put that function in a different thread. Otherwise, the GUI might hang while the program is processing data.

    Warning: Qt's official documentation on QThreads are currently outdated. Don't follow them until they're updated


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.