Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Check QCursor::pos() against widget->rect()

Check QCursor::pos() against widget->rect()

Scheduled Pinned Locked Moved Solved General and Desktop
qwidgetqcursor
2 Posts 2 Posters 421 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dariusz
    wrote on 26 Mar 2020, 02:02 last edited by
    #1

    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

    P 1 Reply Last reply 26 Mar 2020, 03:19
    0
    • D Dariusz
      26 Mar 2020, 02:02

      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

      P Offline
      P Offline
      Pl45m4
      wrote on 26 Mar 2020, 03:19 last edited by Pl45m4
      #2

      @Dariusz

      "You can call QWidget::mapFromGlobal() to translate it to widget coordinates."
      (From https://doc.qt.io/qt-5/qcursor.html#pos)


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      3

      2/2

      26 Mar 2020, 03:19

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved