Commit 3c08da2b authored by Peter Penz's avatar Peter Penz
Browse files

provide "hovering" for the items of a column view

svn path=/trunk/KDE/kdebase/apps/; revision=676005
parent 41192aa7
......@@ -38,9 +38,6 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, DolphinController* control
setDragDropMode(QAbstractItemView::DragDrop);
setDropIndicatorShown(false);
setMouseTracking(true);
viewport()->setAttribute(Qt::WA_Hover);
if (KGlobalSettings::singleClick()) {
connect(this, SIGNAL(clicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
......@@ -77,6 +74,14 @@ DolphinColumnView::~DolphinColumnView()
{
}
QAbstractItemView* DolphinColumnView::createColumn(const QModelIndex& index)
{
QAbstractItemView* view = QColumnView::createColumn(index);
view->setMouseTracking(true);
view->viewport()->setAttribute(Qt::WA_Hover);
return view;
}
QStyleOptionViewItem DolphinColumnView::viewOptions() const
{
return m_viewOptions;
......
......@@ -37,6 +37,7 @@ public:
virtual ~DolphinColumnView();
protected:
virtual QAbstractItemView* createColumn(const QModelIndex& index);
virtual QStyleOptionViewItem viewOptions() const;
virtual void contextMenuEvent(QContextMenuEvent* event);
virtual void mousePressEvent(QMouseEvent* event);
......
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