support for creating GUI via QtCreator added
[toast/confclerk.git] / src / gui / mainwindow.cpp
1 #include "mainwindow.h"
2
3 #include <QTreeView>
4 #include <QDirModel>
5
6 #include <eventmodel.h>
7
8 MainWindow::MainWindow(QWidget *parent)
9     : QMainWindow(parent)
10 {
11     // open database connection
12     QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
13     db.setDatabaseName("fosdem-test.sqlite");
14     db.open();
15
16     setupUi(this);
17     //TODO Palo: continue
18     //treeView->setModel(new QDirModel);
19     treeView->setModel(new EventModel());
20 }