blob: 7dc33845a0a352b4de60ee99c724ea5a5f887a61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "mainwindow.h"
#include <QApplication>
#include <QFileSystemModel>
#include <QTreeView>
#include <QDirModel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDirModel model;
QTreeView tree;
tree.setModel(&model);
tree.setRootIndex(model.index(QDir::homePath()+"/.password-store"));
tree.setColumnHidden( 1, true );
tree.setColumnHidden( 2, true );
tree.setColumnHidden( 3, true );
tree.setWindowTitle(QObject::tr("Dir View:")+QDir::homePath());
tree.resize(640, 480);
tree.show();
return app.exec();
}
|