goqt
goqt copied to clipboard
QScreen.GrabWindow() is missing
I'm trying to grab a screenshot by following this guide: http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html. In there they take a screenshot by running this piece of code:
QScreen *screen = QGuiApplication::primaryScreen();
originalPixmap = screen->grabWindow(0);
I tried to recreate this in goqt, this is what I came up with:
primary := ui.Application.Desktop.PrimaryScreen()
pixmap := ui.Application.Desktop.ScreenWithScreen(primary).GrabWindow()
But the .GrabWindow() function is missing! There are functions for grabbing gestures, keyboards, mouses and shortcuts, but not windows.
This function is present in github.com/therecipe/qt, but I really don't want to switch, because I've already written a part of my application with goqt. And also therecipe/qt needs a lot of time and memory to compile and set up.