summaryrefslogtreecommitdiff
path: root/src/descriptionpage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/descriptionpage.h')
-rw-r--r--src/descriptionpage.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/descriptionpage.h b/src/descriptionpage.h
new file mode 100644
index 00000000..f6158ee0
--- /dev/null
+++ b/src/descriptionpage.h
@@ -0,0 +1,28 @@
+#include <QWebEnginePage>
+
+#ifndef DESCRIPTIONPAGE_H
+#define DESCRIPTIONPAGE_H
+
+class DescriptionPage : public QWebEnginePage
+{
+ Q_OBJECT
+
+public:
+ DescriptionPage(QObject* parent = 0) : QWebEnginePage(parent){}
+
+ bool acceptNavigationRequest(const QUrl & url, QWebEnginePage::NavigationType type, bool isMainFrame)
+ {
+ if (type == QWebEnginePage::NavigationTypeLinkClicked)
+ {
+ emit linkClicked(url);
+ return false;
+ }
+ return true;
+ }
+
+signals:
+ void linkClicked(const QUrl&);
+
+};
+
+#endif //DESCRIPTIONPAGE_H