Results 1 to 7 of 7

Thread: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3

    Dear borisbn,

    In line 6 of your program, the QPixmap must be replaced with QBitmap to reproduce the program.
    That is because I want to use the bitmap as a mask of the brush.
    You can choose a monochrome picture to build the bitmap.

    Actually, when I use QPixmap, the drawing performance is excellent (the same as yours).
    But when I use QBitmap, the performance degrades a lot.
    I think that it should be related to transparent drawing.
    By the way, I can reproduce the problem in Qt4.6, too.

    Thanks.

  2. #2
    Join Date
    Apr 2010
    Location
    Rostov-na-Donu, Russia
    Posts
    153
    Thanks
    2
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3

    ok, I changed QPixmap to QBitmap, and had this results:
    Qt Code:
    1. 571
    2. 493
    3. 498
    4. 498
    5. 497
    6. 500
    7. 500
    8. 497
    9. 497
    10. 500
    To copy to clipboard, switch view to plain text mode 
    image was not clearly showed, time increased by 3 times, but it still not a 1 minute
    can you attach your bitmap file xxx.pbm

  3. #3
    Join Date
    Apr 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3

    Hi,

    I am glad to upload the image file.
    It's in the attachments.

    Thanks a lot.
    Attached Images Attached Images

  4. #4
    Join Date
    Apr 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3

    I've tested the peformace of Qt4.5 in windows environment.
    It seemed that the problem only happened in Linux X11.

  5. #5
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPainter::drawRect in Qt4.5 is much slower than that in Qt4.3


Similar Threads

  1. Qt/mingw a lot slower than borland builder 6.0?
    By qt_gotcha in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2010, 12:11
  2. why Qt4 is so slower than Qt3 ?
    By xuyaojun1980 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th February 2009, 18:32
  3. Which is faster, drawRect(..) Or drawPath(..) ?
    By nileshsince1980 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2008, 08:26
  4. problem about drawRect
    By vql in forum Qt Programming
    Replies: 4
    Last Post: 29th April 2008, 01:07
  5. drawRect inside paintGL()
    By mickey in forum Newbie
    Replies: 16
    Last Post: 18th April 2006, 01:12

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.