Hi all

I am quite new to QT and I want to get the mouse position when clicked on a web page. As far as I know there is a mousePressEvent function that can be used through the QWebView widgent. What I have done so fare is as follow
Qt Code:
  1. // I have set a page to the webview
  2. webView->setUrl(QUrl::fromLocalFile(fileName));
  3. QWebFrame* pFrame = webView->page()->mainFrame();
  4. QWebElement document = pFrame->documentElement();
  5. webView->mousePressEvent(QMouseEvent *e);
  6. qDebug()<<(e->pos());
To copy to clipboard, switch view to plain text mode 

Obviously this does not work. So can anyone help me please how to make this work?

Thanks in advance