I found that double buffering will help a lot regarding flickering problem ....
But my application behaves in different way .... When I am starting the application there is no flickering, but after a few hours the flickering starts with X Errors like - BadDrawable, BadMatch, RenderBadPicture. I even check the memory usage, chached size is increasing very fast and after a certain limit of free space it is creating the problem .... I am not using any continuous dynamic allocation or anything related to memory usage... Only I doubt the pixmaps I am using.... I can not post the code here (As it is huge) .... I am giving the design architecture of my application
RT_TASK {
While (1) // This execute in every 500 milisecond
{
qApp->lock();
timerobject->start(); // signal to my display Slot
qApp->unlock();
} /*End of while*/
}
MyMainApplicationClass :: DisplaySlot()
{
<QPushButton>
->setPixmap
(QPixmap("anyimage.png")) ......
/* A lot of updation */
<QPushButton>
->setPixmap
(QPixmap("anyimage.png"))
}
RT_TASK {
While (1) // This execute in every 500 milisecond
{
qApp->lock();
timerobject->start(); // signal to my display Slot
qApp->unlock();
} /*End of while*/
}
MyMainApplicationClass :: DisplaySlot()
{
<QPushButton>->setPixmap(QPixmap("anyimage.png"))
......
/* A lot of updation */
<QPushButton>->setPixmap(QPixmap("anyimage.png"))
}
To copy to clipboard, switch view to plain text mode
Here I do not create any object for the pixmap, but why my application using memory in incrementing order or creating the X Error ... Anything I am doing wrong in that ???? or What way I can solve the flickering ????
I am also attaching an partial image window of my application where CH, SH .. are QPush buttons and I am also updating .png for those buttons for every 500ms.
Thanks in advance ....................
Bookmarks