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
#1
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
Reply
#2
You might find this interesting.

https://amin-ahmadi.com/2016/02/01/mouse...qt-widget/
Reply
#3
Thank you for your reply
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 490 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Transparent window background, but not text on it muzicman0 7 2,849 Feb-02-2024, 01:28 AM
Last Post: Joically
  Now if window is open or not delcencen 5 1,630 Mar-25-2023, 07:26 PM
Last Post: deanhystad
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,901 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Glow text of clickable object on hover with transition andy 6 6,061 May-11-2021, 07:39 AM
Last Post: andy
  Subprocess window won't open on Mac blakefindlay 1 2,170 Feb-06-2021, 04:23 AM
Last Post: deanhystad
  [Tkinter] How to show text in window? wxnerd 4 3,732 Jun-20-2020, 04:16 PM
Last Post: wxnerd
  [Tkinter] Hover event DT2000 9 7,409 Apr-19-2020, 05:51 AM
Last Post: DT2000
  POPUP on widget Entry taratata2020 4 3,749 Mar-10-2020, 05:04 PM
Last Post: taratata2020
  Second Window can't open due to iExit function Jionni 4 2,537 Feb-29-2020, 06:06 PM
Last Post: Jionni

Forum Jump:

User Panel Messages

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