diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1bba0241..e749e80a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,3 +48,7 @@ target_link_libraries(test_blackborderprocessor add_executable(test_qregexp TestQRegExp.cpp) target_link_libraries(test_qregexp ${QT_LIBRARIES}) + +add_executable(test_qtscreenshot TestQtScreenshot.cpp) +target_link_libraries(test_qtscreenshot + ${QT_LIBRARIES}) diff --git a/test/TestQtScreenshot.cpp b/test/TestQtScreenshot.cpp new file mode 100644 index 00000000..27e03b0f --- /dev/null +++ b/test/TestQtScreenshot.cpp @@ -0,0 +1,20 @@ + +// STL includes +#include + +// QT includes +#include +#include +#include + +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; +}