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,
This may work for you? It did for me
QDesktopWidget *widget = QApplication::desktop(); QPosition globalCursorPosition = widget->cursor().pos();