Here the list + model code :
// List tree model.
CFileSystemModel* ListTreeModel = new CFileSystemModel( this );
ListTreeModel
->setFilter
( QDir::NoDotAndDotDot |
QDir::AllDirs );
ListTreeModel->setIconProvider( new CFileIconProvider );
ListTreeModel->setRootPath( "Content/" );
ListTreeModel->setReadOnly( false );
// List tree.
m_ListTree = new CContentBrowserListTreeView( this );
m_ListTree->setModel( ListTreeModel );
m_ListTree->setItemDelegate( new CFileSystemListDelegate( m_ListTree, this ) );
m_ListTree->setRootIndex( ListTreeModel->index( ListTreeModel->rootPath() ) );
m_ListTree->setCurrentIndex( m_ListTree->rootIndex() );
m_ListTree->setDefaultDropAction( Qt::MoveAction );
m_ListTree->setDropIndicatorShown( true );
m_ListTree->setHeaderHidden( true );
m_ListTree->setDragEnabled( true );
m_ListTree->hideColumn( 1 );
m_ListTree->hideColumn( 2 );
m_ListTree->hideColumn( 3 );
m_ListTree->setMinimumWidth( 150 );
m_ListTree->setContextMenuPolicy( Qt::CustomContextMenu );
// List tree model.
CFileSystemModel* ListTreeModel = new CFileSystemModel( this );
ListTreeModel->setFilter( QDir::NoDotAndDotDot | QDir::AllDirs );
ListTreeModel->setIconProvider( new CFileIconProvider );
ListTreeModel->setRootPath( "Content/" );
ListTreeModel->setReadOnly( false );
// List tree.
m_ListTree = new CContentBrowserListTreeView( this );
m_ListTree->setModel( ListTreeModel );
m_ListTree->setItemDelegate( new CFileSystemListDelegate( m_ListTree, this ) );
m_ListTree->setRootIndex( ListTreeModel->index( ListTreeModel->rootPath() ) );
m_ListTree->setDragDropMode( QAbstractItemView::DragDrop );
m_ListTree->setCurrentIndex( m_ListTree->rootIndex() );
m_ListTree->setDefaultDropAction( Qt::MoveAction );
m_ListTree->setDropIndicatorShown( true );
m_ListTree->setHeaderHidden( true );
m_ListTree->setDragEnabled( true );
m_ListTree->hideColumn( 1 );
m_ListTree->hideColumn( 2 );
m_ListTree->hideColumn( 3 );
m_ListTree->setMinimumWidth( 150 );
m_ListTree->setContextMenuPolicy( Qt::CustomContextMenu );
To copy to clipboard, switch view to plain text mode
The goal is to have a root for each folder and have a custom name for each root like that :
https://answers.unrealengine.com/sto...p/3696-ddd.png
Bookmarks