Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QScreen.GrabWindow() is missing #44

Open
Fornax96 opened this issue Jan 27, 2017 · 0 comments
Open

QScreen.GrabWindow() is missing #44

Fornax96 opened this issue Jan 27, 2017 · 0 comments

Comments

@Fornax96
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant