C Plus - Add - Qt-Embedded - Capturing Screen With QPixmap
C Plus - Add - Qt-Embedded - Capturing Screen With QPixmap
More
C Plus / Add
Embedded systems programming / C, C++
if ( !QFile::exists(tmpFile) )
return;
About Me
QFile f(tmpFile); CjB
if ( !f.open( QIODevice::ReadWrite ) )
return; Carlos Becker
http://carlosbecker.com.ar
char buf[200]; View my complete profile
if ( f.readLine( buf, sizeof(buf) - 4 ) == -1 )
return;
My Blog List
buf[strlen(buf)-1] = '\0'; //remove \n created by 'echo'-- not safe!
C + o − Programación en
strcat( buf, ".png" ); C/C++
La Novedad
//capture 5 weeks ago
QPixmap p = QPixmap::grabWindow( this->winId() );
Notas de código fuente
if ( p.save( buf ) ) Memoize in Java with
printf("------- GRAB OK\n"); Guava
else 3 years ago
printf("------- ERR GRAB!\n");
puedesverlo
/* delete file */ No Class - Motörhead
f.remove(); 4 years ago
}
Si no sucede, no pasa
VALSE
5 years ago
This way, all I have to do to take a snapshot is to write:
1 comment:
Reply
cplusadd.blogspot.com/2009/07/qt-embedded-capturing-screen-with.html 1/2
5/1/2020 C Plus / Add: Qt-Embedded: Capturing screen with QPixmap
Publish Preview
cplusadd.blogspot.com/2009/07/qt-embedded-capturing-screen-with.html 2/2