Creating EventModel class
[toast/confclerk.git] / src / gui / mainwindow.cpp
1 #include "mainwindow.h"
2
3 #include <QTreeView>
4
5 #include <eventmodel.h>
6
7 MainWindow::MainWindow(QWidget *parent)
8     : QMainWindow(parent)
9 {
10     // open database connection
11     QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
12     db.setDatabaseName("fosdem-test.sqlite");
13     db.open();
14
15     QTreeView * view = new QTreeView(parent);
16     this->setCentralWidget(view);
17
18     view->setModel(new EventModel());
19 }