Oct-28-2022, 11:19 AM
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
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