Results 1 to 7 of 7

Thread: receive the word above which there is a cursor of mouse

  1. #1
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Question receive the word above which there is a cursor of mouse

    Hello,

    Can I receive the word above which there is a cursor of mouse?
    It is necessary, that it extended on all working applications.

    For example,
    I have moved cursor in TextEditor,
    I leave the cursor of a mouse above a word "check" for 2 seconds, as result - in a variable wordString it is necessary to bring a word "check".

    Thanks.

  2. #2
    Join Date
    Apr 2007
    Location
    Toruń, POLAND
    Posts
    24
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: receive the word above which there is a cursor of mouse

    I guess you should obtain text cursor for the given position, then having text cursor you "move" left to the beginning of the word and right to the end. You get your word.

    have a nice day, bye

  3. #3
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: receive the word above which there is a cursor of mouse

    It's clear.
    I do not know, how I can receive the text cursor in the another's application.
    Thanks.

  4. #4
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Unhappy Re: receive the word above which there is a cursor of mouse

    Nobody knows as? Can be, then prompt programs written on Qt with this opportunity, and having license GPL?
    Excuse me for English, I from Russia

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: receive the word above which there is a cursor of mouse

    I don't think there is any way to pick text from any arbitrary application on the desktop. The closest you can get to is to take a screenshot.
    J-P Nurmi

  6. The following user says thank you to jpn for this useful post:

    ufo-vl (26th July 2007)

  7. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: receive the word above which there is a cursor of mouse

    On what platform do you need to do this?
    Because it is not possible to do this with Qt only on all platforms.
    On Windows you could take a look at Spy++-like tools(even Spy++, I think the sources are available).

    On KDE, it might be possible to use only Qt but I guess KDE has some API to examine all the widgets on the screen.

    On MAC, like in Windows, you'll have to use platform API. Since they have a manager for everything, there has to be a manager for it too.

    Regards

  8. The following user says thank you to marcel for this useful post:

    ufo-vl (26th July 2007)

  9. #7
    Join Date
    Jul 2007
    Posts
    27
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: receive the word above which there is a cursor of mouse

    Thanks for clearing of a situation
    Excuse me for English, I from Russia

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.