#include <QtGui>
int main(int argc, char *argv[])
{
QFileSystemModel model;
model.setRootPath("");
tree.setModel(&model);
// Demonstrating look and feel features
tree.setAnimated(false);
tree.setIndentation(20);
tree.setSortingEnabled(true);
tree.
setWindowTitle(QObject::tr("Dir View"));
tree.resize(640, 480);
tree.show();
return app.exec();
}
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QFileSystemModel model;
model.setRootPath("");
QTreeView tree;
tree.setModel(&model);
// Demonstrating look and feel features
tree.setAnimated(false);
tree.setIndentation(20);
tree.setSortingEnabled(true);
tree.setWindowTitle(QObject::tr("Dir View"));
tree.resize(640, 480);
tree.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
The above code is the entire code for the dir view demo, on Windows 7, when expanding to the qt dir, I experience several seconds delay as well.
Bookmarks