diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainview.cpp | 13 | ||||
| -rw-r--r-- | src/mainview.h | 3 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/src/mainview.cpp b/src/mainview.cpp index 8cf09e2a..dc614f5c 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -218,6 +218,19 @@ void MainView::clear()  } +void MainView::mouseDoubleClickEvent(QMouseEvent *event) +{ +    if (!childAt(event->pos()) +            // Remove the line below when QTabWidget does not have a one pixel frame +            && event->pos().y() < (tabBar()->y() + tabBar()->height())) +    { +        newWebView(true); +        return; +    } +    KTabWidget::mouseDoubleClickEvent(event); +} + +  // When index is -1 index chooses the current tab  void MainView::slotReloadTab(int index)  { diff --git a/src/mainview.h b/src/mainview.h index 35f887fd..77976551 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -103,6 +103,9 @@ public:      void showTabBar();      void clear(); +protected: +    virtual void mouseDoubleClickEvent(QMouseEvent *event); +  public slots:      /**       * Core browser slot. This create a new tab with a WebView inside | 
