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

Eric Clark eclark at ara.com
Tue Jan 12 17:20:02 CET 2010


Daniel,

First of all, I don't mind you emailing me directly, but please be sure to CC the interest board as well, so that this stuff can be tracked.

In the QWebFrame class, there is a function called hitTestContent that takes a point. Call this function on the main frame with the position of the mouse and it will return a QWebHitTestResult which has all the information you need to determine if there is a link at that position.

Thanks,
Eric

From: Daniel Pinyol [mailto:dpinol at gmail.com]
Sent: Tuesday, January 12, 2010 10:14 AM
To: Eric Clark
Subject: Re: [Qt-interest] How to get mouse button in linkClicked signal?


Daniel,

I did, in a round-about way. Basically, I overloaded the mousePressEvent function and stored the button that was pressed locally in the widget, then when the linkClicked signal went off, I just checked that variable for the button that was pressed. Seems to work great for what I needed. I wanted to open a new tab in my browser when the mid button was pressed on a link, and this approach worked great for me. Is that what you needed? Or are you interested in knowing how to determine if there is a link at the mouse position?
What I want is to do is to open an url within WebKit when mouse is pressed (not clicked, ie. when mouse is released) on a link. I don't know how to get the link Url from mouse position

thanks

Eric

From: Daniel Pinyol [mailto:dpinol at gmail.com<mailto:dpinol at gmail.com>]
Sent: Tuesday, January 12, 2010 6:53 AM
To: Eric Clark
Subject: [Qt-interest] How to get mouse button in linkClicked signal?

Did you solve this problem?
http://lists.trolltech.com/pipermail/qt-interest/2009-June/007981.html

Actually what I want to do is to configure webkit to react when mouse (actually a touchscreen) is pressed and not when it's released

--
Daniel Pinyol
Software Engineer
Pal Robotics S.L.

Tel: +34.93.414.53.47
Fax: +34.93.209.11.09
C/ Pujades 77-79 4º 4ª 08005 Barcelona, Spain.
http://www.pal-robotics.com/

Pablo Picasso - "Computers are useless. They can only give you answers."

AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.



--
Daniel Pinyol
Software Engineer
Pal Robotics S.L.

Tel: +34.93.414.53.47
Fax: +34.93.209.11.09
C/ Pujades 77-79 4º 4ª 08005 Barcelona, Spain.
http://www.pal-robotics.com/

Pablo Picasso - "Computers are useless. They can only give you answers."

AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100112/d50a604f/attachment.html 


More information about the Qt-interest-old mailing list