multiscreen

Qt 5, get the mouse position in a screen

荒凉一梦 提交于 2019-11-30 16:48:13
问题 First of all, I'd like to mention that I found that related post How to get the mouse position on the screen in Qt? but it "just didn't work" for me. I made some tests, and the results didn't work as I expected, so I decided to make a new post to talk about the test I made and to find an alternative solution. That's the code I used to make the test: QScreen *screen0 = QApplication::screens().at(0); QScreen *screen1 = QApplication::screens().at(1); printf("screen0 %s \n", screen0->name()

Take screenshot of multiple desktops of all visible applications and forms

夙愿已清 提交于 2019-11-26 16:29:23
问题 I'm working with a system that has 4 outputs (monitors) with e.g. 1280x1024 pixels for each output. I need a screenshot of the whole desktop and all open applications on it. I tried GetDesktopWindow() (MSDN) but it doesn't work properly. Some forms don't shown on the captured picture. 回答1: i tried GetDesktopWindow() function but it doesn't work properly. Of course not. The GetDesktopWindow function returns a handle to the desktop window. It doesn't have anything to do with capturing an image