hi
{
//msgBox.exec();//ok
if( role==Qt::DisplayRole )
{
//msgBox.exec();//ok
if( index.
column()==QDirModel::columnCount() )//problem {
//msgBox.exec();//not ok
return fileInfo( index ).owner();
}
else
if( index.
column()==QDirModel::columnCount() +1 )//problem return fileInfo( index ).group();
else
if( index.
column()==QDirModel::columnCount() -1 ) {
//msgBox.exec();//ok
return fileInfo( index ).owner();//ok
}
}
}
QVariant MyDirModel::data(const QModelIndex & index, int role) const
{
QMessageBox msgBox;
//msgBox.exec();//ok
if( role==Qt::DisplayRole )
{
//msgBox.exec();//ok
if( index.column()==QDirModel::columnCount() )//problem
{
//msgBox.exec();//not ok
return fileInfo( index ).owner();
}
else
if( index.column()==QDirModel::columnCount() +1 )//problem
return fileInfo( index ).group();
else
if( index.column()==QDirModel::columnCount() -1 )
{
//msgBox.exec();//ok
return fileInfo( index ).owner();//ok
}
}
return QDirModel::data(index, role);
}
To copy to clipboard, switch view to plain text mode
i have a problem with the new columns !!!
Bookmarks