Results 1 to 2 of 2

Thread: Blinking/Flickering Image

  1. #1
    Join Date
    Sep 2008
    Location
    Chennai
    Posts
    36
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11

    Unhappy Blinking/Flickering Image

    I have an application, which is updating status of few (Almost 90) QLabels. The updation is done through a RT_TASK. The RT_TASK will post an QTimer timeout event of 0 to a main class slot and the updation is done from the slot. The RT_TASK will post the timer event in every 500 milisecond. I am updating the status Green or Red, which are images and each time I am loading the images before updating to the QLabel. But after executing the application of approx 3hr, the status (images) are blinking/flickering. How to solve that?
    Tahe sample code for loading the images is as -

    TL_3096Mod2Sts->setPixmap(QPixmap(DP_VS_ImagePath("Sucess_Green.p ng")));

    DP_VS_ImagePath - this function will determine the path of the image.

    Thanks in advance ....

  2. #2
    Join Date
    Sep 2008
    Location
    Chennai
    Posts
    36
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Blinking/Flickering Image

    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

    Qt Code:
    1. RT_TASK {
    2. While (1) // This execute in every 500 milisecond
    3. {
    4. qApp->lock();
    5. timerobject->start(); // signal to my display Slot
    6. qApp->unlock();
    7.  
    8. } /*End of while*/
    9. }
    10.  
    11. MyMainApplicationClass :: DisplaySlot()
    12. {
    13. <QPushButton>->setPixmap(QPixmap("anyimage.png"))
    14. ......
    15. /* A lot of updation */
    16. <QPushButton>->setPixmap(QPixmap("anyimage.png"))
    17.  
    18. }
    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 ....................
    Attached Images Attached Images

Similar Threads

  1. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  2. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  3. Help needed handling image data
    By toratora in forum General Programming
    Replies: 2
    Last Post: 11th May 2007, 09:24
  4. how i can add image in my toolbar
    By jyoti in forum Qt Tools
    Replies: 7
    Last Post: 19th December 2006, 14:39
  5. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.