source: src/gui/mainwindow.cpp @ d0d0a66

qt5
Last change on this file since d0d0a66 was d0d0a66, checked in by komarma <komarma@…>, 12 years ago

Creating EventModel? class

  • Property mode set to 100644
File size: 415 bytes
Line 
1#include "mainwindow.h"
2
3#include <QTreeView>
4
5#include <eventmodel.h>
6
7MainWindow::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}
Note: See TracBrowser for help on using the repository browser.