I have 4 widgets in my app and my app runs on Mini2440 with Qt4.7.4. You can see my configuration at http://www.qtcentre.org/threads/4605...-With-Qt-4.7.4
Anyway, I'm populating lines in those 4 widgets and signaling widgets to repaint/update themselves. I'm printing something to see whether signal reaches to slot or not. There is no problem at that point. I'm calling repaint/update in slot successfully but the screen doesn't update at some point. It starts with updating but after 5-6 minutes the screen stops while slot functions is being called. Also I used QCoreApplication::processEvents(QEventLoop::AllEve nts); after calling update();
The code is like that:
QtBasicGraph::QtBasicGraph(QWidget * parent)
: QWidget(parent),
m_ymin(-1), m_ymax(1), m_xrange(1), m_scroll_error(0), m_render_hints(0), clearAfter(5.5)
{
setAttribute(Qt::WA_OpaquePaintEvent);
connect(this, SIGNAL(repaintSignal()), SLOT(repaintGraph()), Qt::DirectConnection);
}
int QtBasicGraph::addPoint(const QList<QPointF> pointList, QList<QList<QPointF> > gridPointList, char* type)
{
//construct lines
emit repaintSignal();
}
void QtBasicGraph::repaintGraph()
{
update();
QCoreApplication::processEvents(QEventLoop::AllEve nts);
}
For 5-6 minutes it works but after then the graphs stop.
What can be the problem?
Bookmarks