Commit 4b504323 authored by Kai Koehne's avatar Kai Koehne
Browse files

Show horizontal scrollbar in navigator views (if needed)

Requested by con.
parent 982bc3e3
......@@ -29,6 +29,7 @@
#include "navigationtreeview.h"
#include <QtGui/QHeaderView>
#include <QtGui/QFocusEvent>
#ifdef Q_WS_MAC
......@@ -45,6 +46,12 @@ NavigationTreeView::NavigationTreeView(QWidget *parent)
setUniformRowHeights(true);
setTextElideMode(Qt::ElideNone);
setAttribute(Qt::WA_MacShowFocusRect, false);
setHeaderHidden(true);
// show horizontal scrollbar
header()->setResizeMode(QHeaderView::ResizeToContents);
header()->setStretchLastSection(false);
}
// This is a workaround to stop Qt from redrawing the project tree every
......
......@@ -22,7 +22,6 @@ CppOutlineTreeView::CppOutlineTreeView(QWidget *parent) :
{
// see also QmlJSOutlineTreeView
setFocusPolicy(Qt::NoFocus);
setHeaderHidden(true);
setExpandsOnDoubleClick(false);
}
......
......@@ -64,12 +64,6 @@ public:
ProjectTreeView()
{
setEditTriggers(QAbstractItemView::EditKeyPressed);
{
QHeaderView *treeHeader = header();
treeHeader->setVisible(false);
treeHeader->setResizeMode(QHeaderView::Stretch);
treeHeader->setStretchLastSection(true);
}
setContextMenuPolicy(Qt::CustomContextMenu);
// setExpandsOnDoubleClick(false);
}
......
......@@ -24,7 +24,6 @@ QmlJSOutlineTreeView::QmlJSOutlineTreeView(QWidget *parent) :
{
// see also CppOutlineTreeView
setFocusPolicy(Qt::NoFocus);
setHeaderHidden(true);
setExpandsOnDoubleClick(false);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment