Results 1 to 8 of 8

Thread: QPainter problem - migration from qt3 [SOLVED]

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    4

    Thumbs up Re: QPainter problem - migration from qt3

    Problem solved.
    In fact paintEvent() was slow because of double-buffering, which is turned on by default in Qt4. All I had to do is to turn it off.
    I used JPN's code and added the following line in the constructor of my main class (whiteboard)
    Qt Code:
    1. this->setAttribute(Qt::WA_PaintOnScreen);
    To copy to clipboard, switch view to plain text mode 
    After that there is no difference in performance between qt4 and qt3.


    Thanks for help,
    Tomek

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: QPainter problem - migration from qt3 [SOLVED]

    In fact paintEvent() was slow because of double-buffering, which is turned on by default in Qt4.
    Thanks for pointing that out.
    Another handy point to check in the future, if painting is slow.

Similar Threads

  1. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  2. Replies: 7
    Last Post: 20th March 2006, 20:03
  3. Replies: 16
    Last Post: 7th March 2006, 15:57
  4. QPainter rotate function
    By ir210 in forum Newbie
    Replies: 3
    Last Post: 17th January 2006, 04:31
  5. passing a QPainter object to widgets
    By vratojr in forum Qt Programming
    Replies: 9
    Last Post: 11th January 2006, 15:27

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
  •  
Qt is a trademark of The Qt Company.