saman_artorious
11th August 2013, 13:16
I get a screen shot with this code:
QPixmap originalPixmap = QPixmap::grabWidget(this);
QImage *image = new QImage(originalPixmap.toImage());
image->save("/home/saman/Desktop/image.png");
Now, I want to send raw data grabbed from grabWidget over the socket. On the other end, machine receives this raw data and creates a gl texture of it.
As you see, the return value of grabWidget is a QPixmap, I also checked the method data_ptr(), which I think returns what I want with DataPtr format. this format is not recognizable by the compiler though! any idea how to resolve this?
QPixmap originalPixmap = QPixmap::grabWidget(this);
QImage *image = new QImage(originalPixmap.toImage());
image->save("/home/saman/Desktop/image.png");
Now, I want to send raw data grabbed from grabWidget over the socket. On the other end, machine receives this raw data and creates a gl texture of it.
As you see, the return value of grabWidget is a QPixmap, I also checked the method data_ptr(), which I think returns what I want with DataPtr format. this format is not recognizable by the compiler though! any idea how to resolve this?