# 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
#include "mainwindow.h"
#include <QTreeView>
+#include <QDirModel>
#include <eventmodel.h>
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());
}
#include <QtGui/QMainWindow>
-class MainWindow : public QMainWindow
+#include <ui_mainwindow.h>
+
+class MainWindow : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
--- /dev/null
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>791</width>
+ <height>551</height>
+ </rect>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Tab 1</string>
+ </attribute>
+ <widget class="QTreeView" name="treeView" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>781</width>
+ <height>521</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
+ <string>Tab 2</string>
+ </attribute>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>25</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ </widget>
+ <resources/>
+ <connections/>
+</ui>