Works good apparently :
if( QDir( Path
).
mkdir( FolderName
) ) m_NewFolderPath = Path + '/' + FolderName;
if( QDir( Path ).mkdir( FolderName ) )
m_NewFolderPath = Path + '/' + FolderName;
To copy to clipboard, switch view to plain text mode
void Widget::DetailRowsInserted( const QModelIndex& parent, int start, int end )
{
if( m_NewFolderPath.isEmpty() == false )
{
QFileSystemModel* DetailModel = static_cast< QFileSystemModel* >( m_DetailList->model() );
m_DetailList->edit( DetailModel->index( m_NewFolderPath ) );
}
}
void Widget::DetailRowsInserted( const QModelIndex& parent, int start, int end )
{
if( m_NewFolderPath.isEmpty() == false )
{
QFileSystemModel* DetailModel = static_cast< QFileSystemModel* >( m_DetailList->model() );
m_DetailList->edit( DetailModel->index( m_NewFolderPath ) );
}
}
To copy to clipboard, switch view to plain text mode
Only one problem remaining is at the end of the edit that doesn't sort, I don't know if the sort has to be called using the model on file renamed signal of the model or if a better way exists.
Bookmarks