{
unsigned char buffer[20]={0,0,0,0,0,255,255,255,255,255,0,0,0,0,0};
if(pixmap.
loadFromData(buffer,
20,
0,
QPixmap::Auto);
p.drawPIxmap(0,0,pixmap,0,0,-1,-1);
}
void paintEvent(QPaintEvent *)
{
unsigned char buffer[20]={0,0,0,0,0,255,255,255,255,255,0,0,0,0,0};
QPixmap pixmap;
if(pixmap.loadFromData(buffer,20,0,QPixmap::Auto);
QPainter p(this);
p.drawPIxmap(0,0,pixmap,0,0,-1,-1);
}
To copy to clipboard, switch view to plain text mode
. the code gets compiled without error. but nothing is coming on the screen.can anyone provide suggestions for this...?
Bookmarks