[PyQt] Disable context menu of a plugin in QWebview
Hans-Peter Jansen
hpj at urpla.net
Wed Apr 20 10:30:02 BST 2011
On Wednesday 20 April 2011, 00:13:33 Gelonida G wrote:
> Hi Hans-Peter,
>
> Thanks for your answer.
You're welcome.
> On 04/19/2011 03:00 PM, Hans-Peter Jansen wrote:
> > On Monday 18 April 2011, 11:16:17 Gelonida N wrote:
> >>
> >> The browser should always display a given context menu when the user
> >> clicks on the riht mouse button.
> >>
> >>
> >> The flash plugin however grabs the right mouse click and displays the
> >> plugin's menu.
> >>
> >> Is there any way to just display the default browser context menu.
> >
> > I don't believe, that this is possible without getting very, very
> > dirty, but if you found a solution, let us know. (ld preloading comes
> > to my mind).
>
> Not sure, whether ld-preloading works under Windows.
> I know this technique only from Linux.
Sure, that's part of the mess I had in mind...
I expect, that even Qt doesn't get noticed of any mouse events into the
flash controlled area, but you can prove me wrong by reimplementing the
QMouse{Press,Release}Event of the QWebView, (see QMouseEvent doc) and
installing an event filter on it for your events, too.
If you receive any events, fine, try to handle them yourself, otherwise
you're in the business of intercepting (IOW horribly messing with) system
or even os (windows) version dependant events of input devices (given, that
macromedia doesn't provide some kind of interface, do they?).
Pete
More information about the PyQt
mailing list