Re: [Interest] Receive key presses when hovering over a specific widget

2019-07-11 Thread Murphy, Sean
> AFAIK, the easiest way to trap keyPress/keyRelease irrespective of which > widget has the focus is to install an event filter on the QApplication > instance.  Use the mouseEnter/Leave events of the thumbnails to set/clear a > currentThumbnail, and then in eventFilter only act on the 'm' keyPress

Re: [Interest] Receive key presses when hovering over a specific widget

2019-07-11 Thread Tony Rietwyk
Hi Sean, AFAIK, the easiest way to trap keyPress/keyRelease irrespective of which widget has the focus is to install an event filter on the QApplication instance.  Use the mouseEnter/Leave events of the thumbnails to set/clear a currentThumbnail, and then in eventFilter only act on the 'm' ke

Re: [Interest] Receive key presses when hovering over a specific widget

2019-07-11 Thread Murphy, Sean
> Not sure if this fits your use case 100%, but might give you some ideas. I > did > something similar for magnifying images in QLabels, but I don't have your > additional focus issue Yeah, that's the part I'm struggling with at the moment, but I only started messing with this late yesterday

Re: [Interest] Receive key presses when hovering over a specific widget

2019-07-11 Thread Andy
Sean: Not sure if this fits your use case 100%, but might give you some ideas. I did something similar for magnifying images in QLabels, but I don't have your additional focus issue. On the thing being magnified (QLabel-derived class holding the image): - holds a pointer to the magnifier and set

[Interest] Receive key presses when hovering over a specific widget

2019-07-11 Thread Murphy, Sean
I'm trying to figure out the best way to receive key presses when the user hovers over a specific widget, and deliver that keypress information to the parent widget. Say I've got three types of widgets: 1. thumbnailWidget - displays a low resolution version of a full resolution image, essential