diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2014-07-30 22:31:35 +0200 |
---|---|---|
committer | Anne Jan Brouwer <ajbrouwer@totalactivemedia.nl> | 2014-07-30 22:31:35 +0200 |
commit | c2eb3dff58e4de577f6c250ad225d42f762b6c26 (patch) | |
tree | f758e25ee26cc4dd6735cf098dd1150d272f7965 /main.cpp |
initial import
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 00000000..86e2c697 --- /dev/null +++ b/main.cpp @@ -0,0 +1,27 @@ +#include "mainwindow.h" +#include <QApplication> +#include <QFileSystemModel> +#include <QTreeView> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + QFileSystemModel model; + model.setRootPath(QDir::homePath()); + 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 a.exec(); +} |