diff --git a/src/voutline.cpp b/src/voutline.cpp index efda9a44..c40d5897 100644 --- a/src/voutline.cpp +++ b/src/voutline.cpp @@ -11,14 +11,13 @@ extern VNote *g_vnote; VOutline::VOutline(QWidget *parent) - : QTreeWidget(parent), + : VTreeWidget(parent), VNavigationMode(), m_muted(false) { setColumnCount(1); setHeaderHidden(true); setSelectionMode(QAbstractItemView::SingleSelection); - setAttribute(Qt::WA_MacShowFocusRect, false); // TODO: jump to the header when user click the same item twice. connect(this, &VOutline::currentItemChanged, @@ -219,7 +218,7 @@ void VOutline::keyPressEvent(QKeyEvent *event) break; } - QTreeWidget::keyPressEvent(event); + VTreeWidget::keyPressEvent(event); } void VOutline::showNavigation() diff --git a/src/voutline.h b/src/voutline.h index 3f21afd2..78680cc9 100644 --- a/src/voutline.h +++ b/src/voutline.h @@ -1,10 +1,11 @@ #ifndef VOUTLINE_H #define VOUTLINE_H -#include #include #include #include + +#include "vtreewidget.h" #include "vtableofcontent.h" #include "vnavigationmode.h" @@ -12,7 +13,7 @@ class QLabel; // Display table of content as a tree and enable user to click an item to // jump to that header. -class VOutline : public QTreeWidget, public VNavigationMode +class VOutline : public VTreeWidget, public VNavigationMode { Q_OBJECT public: diff --git a/src/vtreewidget.cpp b/src/vtreewidget.cpp index 3bb536dd..d9af30e1 100644 --- a/src/vtreewidget.cpp +++ b/src/vtreewidget.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include