Check QCursor::pos() against widget->rect()
Solved
General and Desktop
-
wrote on 26 Mar 2020, 02:02 last edited by
Hey
Like topic say, as far as I can tell my mouse is in screen coordinate and my widget rect is not... how can I properly do this test?
Regards
Dariusz -
Hey
Like topic say, as far as I can tell my mouse is in screen coordinate and my widget rect is not... how can I properly do this test?
Regards
Dariuszwrote on 26 Mar 2020, 03:19 last edited by Pl45m4"You can call
QWidget::mapFromGlobal()
to translate it to widget coordinates."
(From https://doc.qt.io/qt-5/qcursor.html#pos)
2/2