Replies: 1 comment 1 reply
-
I'm using Qt functions in OpenHantek6022, see the relevant code and a simple striped down solution: ...
auto activeWindow = qApp->activeWindow();
QPixmap screenshot( activeWindow->size() ); // prepare a pixmap with the correct size
QDateTime now = QDateTime::currentDateTime();
QString fileName = now.toString( tr( "yyyyMMdd_hhmmss" ) );
fileName += ".png";
activeWindow->render( &screenshot ); // take the screenshot
// here we have a screenshot ...
screenshot.save( fileName );
... But if I understand your intent correctly you have different graphical measurement programs running on your desktop and you want to make screenshots of individual windows triggered by external events. This cannot be done easily with my approach unless each program provides a measure for it. You should better use a tool like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on automating a set of test instruments in our lab for which I need to take screenshots at certain intervals based on inputs from other instruments. I couldn't find a way on how to do it, I did checked the Hantek6022 Python API by Ho-Ro but that only collects the waveform data and plots it, but OpenHantek also shows the measurement values such as peak to peak voltages, etc, so If I am able to take screenshot by using or extending the required code for it, then I could also get those measurement values. So please help me with how to get it ?
Beta Was this translation helpful? Give feedback.
All reactions