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
#include <QWidget>
#include <QWebEngineView>
#include <QMouseEvent>
class WebPageMapster : public QWebEngineView
{
public:
WebPageMapster();
~WebPageMapster();
protected:
};
#include <QWidget>
#include <QWebEngineView>
#include <QMouseEvent>
class WebPageMapster : public QWebEngineView
{
public:
WebPageMapster();
~WebPageMapster();
protected:
void mousePressEvent(QMouseEvent *event);
};
To copy to clipboard, switch view to plain text mode
webtest.cpp
WebPageMapster::WebPageMapster()
{
load
(QUrl("http://google.ch"));
resize(800,600);
show();
}
void WebPageMapster
::mousePressEvent(QMouseEvent *event
){ if (event->button()== Qt::LeftButton){
qDebug() << "Test";
}
}
WebPageMapster::WebPageMapster()
{
load(QUrl("http://google.ch"));
resize(800,600);
show();
}
void WebPageMapster::mousePressEvent(QMouseEvent *event){
if (event->button()== Qt::LeftButton){
qDebug() << "Test";
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks