ui/qt/window.cpp

changeset 66
8d490d97aab8
parent 56
87e3a5dc66dd
child 67
f72c4f01bf4a
--- a/ui/qt/window.cpp	Mon Jan 05 18:47:07 2015 +0100
+++ b/ui/qt/window.cpp	Wed Jan 07 17:25:33 2015 +0100
@@ -34,6 +34,8 @@
 #include "toolbar.h"
 #include "container.h"
 
+#include <QVBoxLayout>
+
 UiObject* ui_window(char *title, void *window_data) {
     UcxMempool *mp = ucx_mempool_new(256);
     UiObject *obj = (UiObject*)ucx_mempool_calloc(mp, 1, sizeof(UiObject));
@@ -49,7 +51,12 @@
     QToolBar *toolbar = ui_create_toolbar(obj);
     window->addToolBar(Qt::TopToolBarArea, toolbar);
     
-    obj->container = new UiWindowContainer(window);
+    //QBoxLayout *box = new QBoxLayout(QBoxLayout::TopToBottom);
+    QBoxLayout *box = new QVBoxLayout();
+    QWidget *boxWidget = new QWidget();
+    boxWidget->setLayout(box);
+    window->setCentralWidget(boxWidget);
+    obj->container = new UiBoxContainer(box);
     
     obj->widget = window;
     return obj;

mercurial