[Qt-interest] How to get mouse button in linkClicked signal?

Eric Clark eclark at ara.com
Wed Jun 3 22:21:12 CEST 2009


This poses another question. If I handle the mouse event, is there an easy way to ask the QWebView if there is a link at the mouse event's position, and, if there is, what is it and its url?

Or are you suggesting, to store the mouse button prior to responding to the linkedClicked signal? This would work as long as the mouse event is raised before the linkedClicked signal?

Eric

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of R. Reucher
Sent: Wednesday, June 03, 2009 12:20 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to get mouse button in linkClicked signal?

Well, when sub-classing from a QWebView, you can easily respond to 
mouse-events as with all QWidgets. The QMouseEvent whoch is passed has all 
the information you need.

See: http://doc.qtsoftware.com/4.5/qwidget.html#mousePressEvent

On Wed June 3 2009 18:47:30 Eric Clark wrote:
> Thanks Benjamin, I will look into it.
>
> Eric
>
> -----Original Message-----
> From: Benjamin Meyer [mailto:ben at meyerhome.net]
> Sent: Wednesday, June 03, 2009 10:28 AM
> To: Eric Clark
> Cc: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] How to get mouse button in linkClicked signal?
>
> There is no direct way in QtWebKit, but it is probably worth checking
> out the source for Arora as in it we do have a ok way to determine
> what to do depending on key and mouse modifiers.
>
> -Benjamin Meyer
>
> On Jun 3, 2009, at 10:03 AM, Eric Clark wrote:
> > Hello All,
> >
> > Does anyone know if there is a way to get the mouse button that was
> > pressed when responding to the linkClicked signal in QWebPage?
> >
> > Thanks,
> > Eric
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest



-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

	How many seconds are there in a year?  If I tell you there  are
3.155  x  10^7, you won't even try to remember it.  On the other hand,
who could forget that, to within half a percent, pi seconds is a
nanocentury.
		-- Tom Duff, Bell Labs

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list