I have try to use bitBlt but it seems failed. the "buffer" is null. Is there any problem with the code?
QImage hehe
("f_rain1m_e5bff66.jpg" );
bitBlt(&buffer, 4, 5 , &hehe, lstBox->x(), lstBox->y(), lstBox->width(), lstBox->height(), CopyROP);
lstBox->setPaletteBackgroundPixmap(buffer);
qWarning("%d",buffer.isNull());
QImage hehe("f_rain1m_e5bff66.jpg" );
QImage buffer;
bitBlt(&buffer, 4, 5 , &hehe, lstBox->x(), lstBox->y(), lstBox->width(), lstBox->height(), CopyROP);
lstBox->setPaletteBackgroundPixmap(buffer);
qWarning("%d",buffer.isNull());
To copy to clipboard, switch view to plain text mode
NB:
The result in terminal is 1 which mean the buffer is still null, right?
Bookmarks