from http://doc.trolltech.com/3.1/qwidget.html I noticed "We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker.
Warning: If you call repaint() in a function which may itself be called from paintEvent(), you may get infinite recursion. The update() function never causes recursion. "
And in Qpegps::updateData() -
if(d_pViewer->visibleWidget() == mapDisp) {
d_pViewer->visibleWidget()->repaint();
//if (gpsData->mGPSsimLocation.isEmpty() )
//d_pViewer->visibleWidget()->update();
}
else
{
if (tb == mapDisp) { // update moving map
mapDisp->repaint();
etc.
Why did you use repaint() here? I tried "update()" and it behaved the same. I do not know what is better. Just wondering why you chose repaint().
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
from http://doc.trolltech.com/3.1/qwidget.html I noticed "We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker.
Warning: If you call repaint() in a function which may itself be called from paintEvent(), you may get infinite recursion. The update() function never causes recursion. "
And in Qpegps::updateData() -
if(d_pViewer->visibleWidget() == mapDisp) {
d_pViewer->visibleWidget()->repaint();
//if (gpsData->mGPSsimLocation.isEmpty() )
//d_pViewer->visibleWidget()->update();
}
else
{
if (tb == mapDisp) { // update moving map
mapDisp->repaint();
etc.
Why did you use repaint() here? I tried "update()" and it behaved the same. I do not know what is better. Just wondering why you chose repaint().
Thanks.
I'm not sure. Originally it was update. But as far as I remember there was a problem with the QWidgetStack which is used for the fullscreen mode.