Skip to content
Snippets Groups Projects
Commit 236bb037 authored by Robert Loehning's avatar Robert Loehning
Browse files

Added tooltips showing the full path to FolderNavigationWidget.

parent 40f0d4d7
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,26 @@ bool DotRemovalFilter::filterAcceptsRow(int source_row, const QModelIndex &paren
return fileName != m_dot;
}
class FolderNavigationModel : public QFileSystemModel
{
public:
explicit FolderNavigationModel(QObject *parent = 0);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
};
FolderNavigationModel::FolderNavigationModel(QObject *parent) :
QFileSystemModel(parent)
{
}
QVariant FolderNavigationModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::ToolTipRole)
return QDir::toNativeSeparators(QDir::cleanPath(filePath(index)));
else
return QFileSystemModel::data(index, role);
}
/*!
/class FolderNavigationWidget
......@@ -98,7 +118,7 @@ bool DotRemovalFilter::filterAcceptsRow(int source_row, const QModelIndex &paren
FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
: QWidget(parent),
m_listView(new QListView(this)),
m_fileSystemModel(new QFileSystemModel(this)),
m_fileSystemModel(new FolderNavigationModel(this)),
m_filterModel(new DotRemovalFilter(this)),
m_title(new QLabel(this)),
m_autoSync(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment