I'm using QTreeView together with QFileSystemModel to display content of a directory like this
However as you can see, if the sub-directories go too deep, the text is clipped and becomes unreadable. I would like to rather have a horizontal scrollbar that will allow me to see the full names. Anyone knows how to do it?
If you're interested how my view and model is initialized, then this is how
ui->mapDirView->setModel( &mapModel );
ui->mapDirView->setSelectionMode( QAbstractItemView::ExtendedSelection );
mapModel.setFilter( QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks );
mapModel.setNameFilters( getModFileSuffixes() );
mapModel.setNameFilterDisables( false );
ui->mapDirView->setHeaderHidden( true );
for (int i = 1; i < mapModel.columnCount(); ++i)
ui->mapDirView->hideColumn(i);
class EmptyIconProvider : public QFileIconProvider
{
public:
virtual QIcon icon( IconType ) const override { return QIcon(); }
virtual QIcon icon( const QFileInfo & ) const override { return QIcon(); }
};
mapModel.setIconProvider( new EmptyIconProvider );
although i doubt any of this is the cause.