Problems with QTreeview + QFileSystemModel
-
Hello,
I use QFileSystemModel and Qtreeview for a directoryview. If a folder has a subfolder and the subfolder was expanded anytime before, I can`t rename this folder.
Any hints how I could fix that?@#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);QFileSystemModel filemodel; filemodel.setRootPath(""); QTreeView treeview; treeview.setModel(&filemodel); filemodel.setReadOnly(false); treeview.setIndentation(20); treeview.setSortingEnabled(true); filemodel.setReadOnly(false); treeview.setWindowTitle(QObject::tr("Dir View"));
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
tree.showMaximized();
#else
treeview.resize(640, 480);
treeview.show();
#endifreturn app.exec();
}
@