[PyQt] Hover over highlighted text and open popup window - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [PyQt] Hover over highlighted text and open popup window (/thread-38557.html) |
Hover over highlighted text and open popup window - DrakeSoft - Oct-28-2022 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 RE: Hover over highlighted text and open popup window - deanhystad - Oct-28-2022 You might find this interesting. https://amin-ahmadi.com/2016/02/01/mouse-hover-over-event-qt-widget/ RE: Hover over highlighted text and open popup window - DrakeSoft - Oct-29-2022 Thank you for your reply |