Qt 5, get the mouse position in a screen
问题 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()