0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 17:28:14 +08:00
Sergey Yagovtsev 5f96b6403c Remove abs path
2016-06-10 23:45:21 +03:00

33 lines
580 B
C++

#include <QApplication>
#include <QTreeView>
#include <QFileSystemModel>
#include "treemodel.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
//QFileSystemModel *model = new QFileSystemModel;
//model->setRootPath(QDir::currentPath());
const char* filename = 0;
if(argc > 1 && argv[1]){
filename = argv[1];
}else{
return 255;
}
QFile file(filename);
file.open(QIODevice::ReadOnly);
TreeModel model(file.readAll());
file.close();
QTreeView *tree = new QTreeView();
tree->setModel(&model);
tree->show();
return app.exec( );
}