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. Get the word when mouse cursor is hovering over it
Forum Updated to NodeBB v4.3 + New Features

Get the word when mouse cursor is hovering over it

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    how to get the word when mouse cursor is hovering over it ?

    for example ,when pointing the mouse at the word “signal” ,I should get the word “signal” . how to implement this ? any ideas ?

    system : Ubuntu

    1 Reply Last reply
    0
    • B Offline
      B Offline
      butterface
      wrote on last edited by
      #2

      Supposing your text is displayed in a label or so you get the position on this label and with QFontMetrics you can calculate the metrics of this text to get the position of single words.
      If you have a label only containing "signal" it is enough to know that you are hovering the label.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        redstoneleo
        wrote on last edited by
        #3

        no widget specific here.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          butterface
          wrote on last edited by
          #4

          And now we should guess where you are hovering over and where the text comes from?

          Lets try another example: Make a screenshot, use OCR, find your cursor and there we go.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            redstoneleo
            wrote on last edited by
            #5

            the word could be in any place of a screen , a web page ,a PDF page and so on .I just want to find a generic way to get the world the mouse cursor pointing at .
            I also thought of OCR ,but this technology is not mature enough !

            1 Reply Last reply
            0

            • Login

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