Real Packet Counter

Hello Experts, I want to program a realtime Packet counter, that is consist of two threads, first is packet counter engine and second is a (QTWidget)QT gui program(main process) for painting a real time chart, which classes or events are suitable for doing that? (OpenGL or Paint event or ...).note that it must be capable to updating itself in a loop.
also, I made thread in a widget constructor, how can I pass data from thread function to a widget method, instantly, repeatly?
TNX ?(