thank you for your fast answer here is the code in question,
i use qApp->processEvents ( QEventLoop::ExcludeUserInputEvents ) because usually that process my queue
from my main GUI thread here is my slot
void MainWindow::updateGUI_slot()
{
qApp
->processEvents
( QEventLoop::ExcludeUserInputEvents );
qApp->flush();
}
void MainWindow::updateGUI_slot()
{
qApp->processEvents ( QEventLoop::ExcludeUserInputEvents );
qApp->flush();
}
To copy to clipboard, switch view to plain text mode
here is my timerThread, (the one that has been created from the main thread),
so _parent is my MainWindow pointer
timerThread
::timerThread (QObject *_parent
){
parent = _parent;
}
timerThread::~timerThread ()
{
delete timer;
}
void timerThread::run ()
{
connect(timer, SIGNAL(timeout()), parent, SLOT(updateGUI_slot()), Qt::DirectConnection );
timer->start(1000);
exec();
}
timerThread::timerThread (QObject *_parent)
{
parent = _parent;
}
timerThread::~timerThread ()
{
delete timer;
}
void timerThread::run ()
{
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), parent, SLOT(updateGUI_slot()), Qt::DirectConnection );
timer->start(1000);
exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks