Кстати, дергать функцию по таймеру мне думается нормальное решение. Таймер все равно работает, посылая сообщение в очередь. Только 100 мс многовато. Можно поставить чуть ли не 5 мс. Если таймер не успевает, то Qt эту ситуацию нормально отрабатывает.
На счет цикла сообщений: нужно в main() QCoreApplication::exec() заменть на свой цикл с QCoreApplication::processEvents(...).
Несколько цитат по теме:
QApplication:
int QCoreApplication::exec () [static]
Enters the main event loop and waits until exit() is called.
Returns the value that was set to exit()
(which is 0 if exit() is called via quit()).
It is necessary to call this function to start event handling.
The main event loop receives events from the window system
and dispatches these to the application widgets.
[b]To make your application perform idle processing
(i.e. executing a special function whenever there are no pending events),
use a QTimer with 0 timeout. More advanced idle processing
schemes can be achieved using processEvents().[/b]
See also quit(), exit(), processEvents(), and QApplication::exec().
QApplication:
void QCoreApplication::processEvents ( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents ) [static]
Processes all pending events for the calling thread according to
the specified flags until there are no more events to process.
You can call this function occasionally when your program
is busy performing a long operation (e.g. copying a file).
Calling this function processes events only for the calling thread.
Note: This function is thread-safe.
See also exec(), QTimer, QEventLoop::processEvents(), flush(), and sendPostedEvents().
QTimer:
As a special case, a QTimer with a timeout of 0 will
time out as soon as all the events in the window system's
event queue have been processed. This can be used to
do heavy work while providing a snappy user interface:
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(processOneThing()));
timer->start();
processOneThing() will from then on be called repeatedly.
It should be written in such a way that it always returns quickly
(typically after processing one data item) so that Qt can deliver
events to widgets and stop the timer as soon as it has done
all its work. This is the traditional way of implementing heavy
work in GUI applications; multithreading is now becoming
available on more and more platforms, and we expect that
zero-millisecond QTimers will gradually be replaced by QThreads.
Note that QTimer's accuracy depends on the underlying
operating system and hardware. Most platforms support
an accuracy of 1 millisecond, but Windows 98 supports
only 55. If Qt is unable to deliver the requested number
of timer clicks, it will silently discard some.