[Qt-interest] QPixmap Vs QImage

Jason H scorp1us at yahoo.com
Thu Nov 12 04:56:31 CET 2009


QImage is device independent, good for storing things in a device independent way.
QPixmap is optimized for what ever device you're painting to.

You need should probably just setBackgroundBrush(QPixmap(myPixmap));





________________________________
From: Santhosh Y <santhosh at softjin.com>
To: "qt-interest at trolltech.com" <qt-interest at trolltech.com>
Sent: Wed, November 11, 2009 10:50:46 PM
Subject: [Qt-interest] QPixmap Vs QImage

Hi,

I need to show image on the background of QGraphicsView.

I have the data to construct both QImage & QPixmap.

But which one to use and why?

I am using  void drawBackground (QPainter*
painter, const QRectF& rect ) method to show image on
QGraphicsView

-- 
----------------------------------------------------
Y Santhosh Kumar - 
Senior Software Engineer,
SoftJin Technologies Pvt Ltd,
www.softjin.com
----------------------------------------------------


Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/9b376f36/attachment.html 


More information about the Qt-interest-old mailing list