Changeset d0d0a66 for src/gui


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

Creating EventModel? class

Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/gui.pro

    r489f262 rd0d0a66  
    33DESTDIR = ../bin
    44CONFIG += static
     5QT += sql
    56
    67# module dependencies
    7 LIBS += -L$$DESTDIR -lmodel
    8 INCLUDEPATH += ../model
    9 DEPENDPATH += . ../model
    10 TARGETDEPS += $$DESTDIR/libmodel.a
     8LIBS += -L$$DESTDIR -lmodel -orm
     9INCLUDEPATH += ../orm ../model
     10DEPENDPATH += . ../orm ../model
     11TARGETDEPS += $$DESTDIR/liborm.a $$DESTDIR/libmodel.a
    1112
    1213
  • 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.