Hello again
,
I want acess updated data from xpto Class/Thread.
int main(int argc, char *argv[])
{
QtInterface w;
Test *xpto;
....
a.connect(timer, SIGNAL(timeout()), &a, SLOT(w.dostuff(xpto)));
timer->start(5000);
....
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QtInterface w;
Test *xpto;
....
QTimer *timer = new QTimer(&a);
a.connect(timer, SIGNAL(timeout()), &a, SLOT(w.dostuff(xpto)));
timer->start(5000);
....
}
To copy to clipboard, switch view to plain text mode
Is this supose to call the SLOT in Qt.cpp every 5 sec., passing updated xpto?
Because i tested with timers in Qt.cpp and is working perfectly.
In Main.cpp isn't working.
Do i have to use a timer in Main.cpp and use another timer in Qt.cpp to update QTableWidgetItem?
How should i config both timers? (if needed)
Thanks.
Bookmarks