Ignore:
Timestamp:
01/02/10 22:14:10 (12 years ago)
Author:
komarma <komarma@…>
Branches:
master, qt5
Children:
9bbb44e
Parents:
489f262
Message:

Creating EventModel? class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r489f262 rd0d0a66  
    11#include "mainwindow.h"
     2
     3#include <QTreeView>
     4
     5#include <eventmodel.h>
    26
    37MainWindow::MainWindow(QWidget *parent)
    48    : QMainWindow(parent)
    59{
     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());
    619}
Note: See TracChangeset for help on using the changeset viewer.