Python Forum
[PyQt] Hover over highlighted text and open popup window
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Hover over highlighted text and open popup window

I am looking for an approach that might allow me to hover over a highlighted work in a QTextEdit widget and on hovering open a pop-up window to perform some action on that section of text.

One approach I can think of is to use an event filter. The event filter could trap the mouse action and then I could open a dialogue but I am not sure how I would correlate the mouse position to the section of text.

Another approach would be to programmatically select the section of text using a cursor and then somehow correlate the selected text to the popup window.

Does anyone have suggestions as to possible approaches?

You might find this interesting.
Thank you for your reply

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 648 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Glow text of clickable object on hover with transition andy 6 3,649 May-11-2021, 07:39 AM
Last Post: andy
  Subprocess window won't open on Mac blakefindlay 1 1,578 Feb-06-2021, 04:23 AM
Last Post: deanhystad
  [Tkinter] How to show text in window? wxnerd 4 2,622 Jun-20-2020, 04:16 PM
Last Post: wxnerd
  [Tkinter] Hover event DT2000 9 5,548 Apr-19-2020, 05:51 AM
Last Post: DT2000
  POPUP on widget Entry taratata2020 4 2,837 Mar-10-2020, 05:04 PM
Last Post: taratata2020
  Second Window can't open due to iExit function Jionni 4 1,754 Feb-29-2020, 06:06 PM
Last Post: Jionni
  [PyQt] Ubuntu Taskbar icon shows title as "Unknown" while hover davidmuni 3 2,777 Jan-28-2020, 01:13 PM
Last Post: davidmuni
  tkinter window and turtle window error 1885 3 5,190 Nov-02-2019, 12:18 PM
Last Post: 1885
  [Tkinter] Text window not properly sized smabubakkar 1 1,449 Jun-16-2019, 08:55 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020