Results 1 to 3 of 3

Thread: repaint issue in qt4

  1. #1
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default repaint issue in qt4

    Hai friends,
    I have a problem in qt4.4 QWizardPage. i am writing a program which checks something when next button is pressed(of QWizard page ). So validatePage() function will be called.
    The validatePage() takes some time to check and its results will be displayed in a QTextEdit.
    But the problem is that whenever some window moves over it(at the time when validatePage() is running ) , whatever displayed on it will gets lost or get blurred.
    I want to avoid such repaint issues such that whenever something overlaps it or moves over it, its display still have to be in the same condition as before.
    I tried several methods including a timer which is activated periodically and it will repaint the QWizardPage but it is not working because after validatePage gets activated nothing can repaint the window. Only after validatePage() is over that we can do anything to window.
    This is a general problem such that if any function is working in qt4, we cannot repaint the window when its display is overwritten by some other windows. Only after its execution that we can repaint the window
    I want a solution to repaint window whenever its display gets damaged due to repaint

    I searched google but i cannot find anything useful. Any help will be deeply appreciated

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: repaint issue in qt4

    You are starving the event loop. Read this article to see how to avoid it:
    http://doc.trolltech.com/qq/qq27-responsive-guis.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    ancest (12th March 2009)

  4. #3
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: repaint issue in qt4

    Thanks wysota for your help. That note was very much helpful and interesting.
    According to my problem i am now using a worker thread to do my function. So the repaint issue will be handled automatically by the main gui application

Similar Threads

  1. QPushButton not calling repaint when needed?
    By Enygma in forum Qt Programming
    Replies: 5
    Last Post: 13th May 2010, 17:03
  2. Opengl issue with Qt4.4.3
    By j0rt4g4 in forum Newbie
    Replies: 13
    Last Post: 2nd December 2008, 12:36
  3. Replies: 1
    Last Post: 28th October 2008, 16:29
  4. Using QGraphicsView as a Splash Screen (repaint issues)
    By chezifresh in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 21:22
  5. force repaint
    By georgie in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2006, 13:16

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.