Python Forum

Full Version: Hover over highlighted text and open popup window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

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?

regards
Thank you for your reply