[Qt-interest] QPixmap

Gabriel M. Beddingfield gabrbedd at gmail.com
Thu Apr 8 14:58:28 CEST 2010



On Thu, 8 Apr 2010, Qrikg wrote:

>     QPixmap oPixmap;

TFM says:

     QPixmap::QPixmap ()

     Constructs a null pixmap.

>     QPainter painter(&oPixmap);
>     QPixmap sample_icon((const char**)sample_icon);
>             painter.drawPixmap( QRect(x,0,10,10),
>                             sample_icon, QRect(0, 0, 10, 10 ));           

If you just want to /copy/ the pixmap... why not do this:

     oPixmap = sample_icon.copy(0, 0, 10 10);

Otherwise, see the attached example.

-gabriel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copyblt.cpp
Type: text/x-c++src
Size: 1233 bytes
Desc: 
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100408/e976c1f0/attachment.bin 


More information about the Qt-interest-old mailing list