Results 1 to 2 of 2

Thread: For PNG file drawing....?

  1. #1
    Join Date
    Jan 2008
    Posts
    91
    Thanks
    8

    Default For PNG file drawing....?

    Hi All ,
    I want to draw a png file to a QLabel with paintevent. Now I am using "drawPixmap(QPoint &,QPixmap &);" function. But I see that there is also "drawImage(QPoint &,QImage &);" . Which is the fastest way for drawing a .png Image?

    Best Regards

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

    Default Re: For PNG file drawing....?

    1. Why not use QLabel::setPixmap() instead?
    2. drawImage converts the image to a pixmap and then draws it. On Windows images and pixmaps are equivalent so the difference there is minimal, on other platforms drawImage() will be slower because of that conversion.

Similar Threads

  1. Apparent error in QtCore/quuid.h
    By cwp500 in forum Qt Programming
    Replies: 11
    Last Post: 18th December 2008, 20:51
  2. Problems with QString
    By cyberboy in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2008, 08:18
  3. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  4. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.