hyperion.ng/test/TestQtScreenshot.cpp
T. van der Zwan eb4170c316 Create test program for creating screenshot with Qt
Former-commit-id: 7e665ef0cd63f66c34ba2b441cafe34689358f3a
2013-12-20 19:46:03 +01:00

21 lines
401 B
C++

// STL includes
#include <iostream>
// QT includes
#include <QApplication>
#include <QDesktopWidget>
#include <QPixmap>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
std::cout << "Grabbed image: [" << originalPixmap.width() << "; " << originalPixmap.height() << "]" << std::endl;
return 0;
}