From: korrco Date: Thu, 7 Jan 2010 16:07:29 +0000 (+0000) Subject: support for creating GUI via QtCreator added X-Git-Tag: 0.5.0~320 X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/commitdiff_plain/9bbb44ecc898f46d91ebe36f160f42c283ec591c support for creating GUI via QtCreator added --- diff --git a/src/gui/gui.pro b/src/gui/gui.pro index f8f6988..976ec68 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -15,6 +15,7 @@ TARGETDEPS += $$DESTDIR/liborm.a $$DESTDIR/libmodel.a # Please note that resources MUST be added to the app module # (which means they need to be added to the test module as well, # but I am sure you can live with that for the time being). +FORMS += mainwindow.ui SOURCES += mainwindow.cpp HEADERS += mainwindow.h diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index e0f20d4..bf48d91 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1,6 +1,7 @@ #include "mainwindow.h" #include +#include #include @@ -12,8 +13,8 @@ MainWindow::MainWindow(QWidget *parent) db.setDatabaseName("fosdem-test.sqlite"); db.open(); - QTreeView * view = new QTreeView(parent); - this->setCentralWidget(view); - - view->setModel(new EventModel()); + setupUi(this); + //TODO Palo: continue + //treeView->setModel(new QDirModel); + treeView->setModel(new EventModel()); } diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 94aa77a..1828fd3 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -3,7 +3,9 @@ #include -class MainWindow : public QMainWindow +#include + +class MainWindow : public QMainWindow, private Ui::MainWindow { Q_OBJECT diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui new file mode 100644 index 0000000..bdce5c7 --- /dev/null +++ b/src/gui/mainwindow.ui @@ -0,0 +1,64 @@ + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 791 + 551 + + + + 0 + + + + Tab 1 + + + + + 0 + 0 + 781 + 521 + + + + + + + Tab 2 + + + + + + + + 0 + 0 + 800 + 25 + + + + + + + +