Im new in this Forum and new to Qt .
On a WebView I try to reimplement a MouseEvent. The Application start without a error but the qDebug message doesn't appear.
Please check my code...


Thanks for help
Webtest.h
Qt Code:
  1. #include <QWidget>
  2. #include <QWebEngineView>
  3. #include <QMouseEvent>
  4.  
  5. class WebPageMapster : public QWebEngineView
  6. {
  7. public:
  8. WebPageMapster();
  9. ~WebPageMapster();
  10.  
  11.  
  12. protected:
  13. void mousePressEvent(QMouseEvent *event);
  14. };
To copy to clipboard, switch view to plain text mode 

webtest.cpp
Qt Code:
  1. WebPageMapster::WebPageMapster()
  2. {
  3. load(QUrl("http://google.ch"));
  4. resize(800,600);
  5. show();
  6.  
  7.  
  8. }
  9.  
  10. void WebPageMapster::mousePressEvent(QMouseEvent *event){
  11. if (event->button()== Qt::LeftButton){
  12. qDebug() << "Test";
  13. }
  14. }
To copy to clipboard, switch view to plain text mode