summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAnders Buus <buus@buus-laptop.(none)>2009-07-07 22:31:36 +0200
committerAnders Buus <buus@buus-laptop.(none)>2009-07-07 22:31:36 +0200
commit71112a4876da980d79e5a9a505b27b75139ced3b (patch)
tree8f18dac30661ad547e4a1451e835594d3590e1f3 /src/webview.cpp
parentMerge commit 'avaddon/master' (diff)
downloadrekonq-71112a4876da980d79e5a9a505b27b75139ced3b.tar.xz
add mouse actions in webview
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index d5744ccc..ce7378de 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -251,3 +251,17 @@ void WebView::keyPressEvent(QKeyEvent *event)
QWebView::keyPressEvent(event);
}
+
+void WebView::mousePressEvent(QMouseEvent *event)
+{
+ switch(event->button()) {
+ case Qt::XButton1:
+ triggerPageAction(QWebPage::Back);
+ break;
+ case Qt::XButton2:
+ triggerPageAction(QWebPage::Forward);
+ break;
+ default:
+ QWebView::mousePressEvent(event);
+ };
+}