[Interest] Removing a folder from QFileSystemModel problem

Sujan Dasmahapatra sujan.dasmahapatra at gmail.com
Thu May 30 04:53:13 CEST 2013


class CSDesignLibTreeView : public QTreeView
{
Q_OBJECT
public:
void slot_DeleteFolder();

};
void CSDesignLibTreeView::slot_DeleteFolder()
{
QFileSystemModel *filemodel = qobject_cast<QFileSystemModel *> (model());
filemodel->remove(currentIndex());
}



Please check the above snippet I am removing one index from
QFileSystemModel. The item is deleted but my treeview is not updating it
immediatly, if I click on some other item then I can see it's deleted.
Please tell me how i can update it immediately when it deleted.

-- 
Thanks & Regards
Sujan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130530/89113285/attachment.html>


More information about the Interest mailing list