Fix scrolling in file system view

The style can set the scroll bar to scroll by item, which breaks
the automatic scrolling that adapts for size changes of the bread crumbs.
Force the tree view to allow pixel-exact scrolling.

Task-number: QTCREATORBUG-19800
Change-Id: If61640a1b6e3b4a777269fb129bdc2689bad19c2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Eike Ziller
2018-03-16 09:51:42 +01:00
parent 957e860dda
commit 6e7540988e

View File

@@ -270,6 +270,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
setHiddenFilesFilter(false);
m_showBreadCrumbsAction->setCheckable(true);
setShowBreadCrumbs(true);
m_listView->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
m_listView->setIconSize(QSize(16,16));
m_listView->setModel(m_fileSystemModel);
m_listView->setEditTriggers(QAbstractItemView::NoEditTriggers);