Tinu
7th April 2015, 07:57
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:
void mousePressEvent(QMouseEvent *event);
};
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";
}
}
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:
void mousePressEvent(QMouseEvent *event);
};
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";
}
}