Hi,

This is my first post.....

Qt Code:
  1. QDirModel *model = new QDirModel(this);
  2. model->setReadOnly(true);
  3.  
  4. model->setSorting(QDir::DirsFirst | QDir::IgnoreCase | QDir::Name);
  5. model->setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
  6.  
  7.  
  8. QTreeView *treeView = new QTreeView;
  9. treeView->setModel(model);
  10. QDir dir("../node");
  11. treeView->setRootIndex(model->index(dir.path()));
To copy to clipboard, switch view to plain text mode 

The above code is working fine. I need to do three more things. The further directory structure inside ("node") directory consists more directories with (.xml,.bmp,.txt) files.

How do I edit QDirModel so that:

1. It should only shows directories and ".xml" files only.

2. Every ".xml" file has equivalent ".bmp" file in the same directory. For e.g. "tree.xml" & "tree.bmp". By default ".xml" files shows system's icon. I need to show the ".bmp" icon
instead of default icon.

3. I don't need the header with colums (Name, Size, Type etc.)

Regards

Prashant