ui/qt/window.cpp

changeset 627
3f0c9fe60c68
parent 574
19de5292f08f
child 688
a3a057c0a0b6
equal deleted inserted replaced
626:724c7036a03e 627:3f0c9fe60c68
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include <cx/mempool.h> 29 #include <cx/mempool.h>
30 #include "../common/context.h" 30 #include "../common/context.h"
31 #include "../common/object.h"
31 32
32 #include "window.h" 33 #include "window.h"
33 #include "menu.h" 34 #include "menu.h"
34 #include "toolbar.h" 35 #include "toolbar.h"
35 #include "container.h" 36 #include "container.h"
37 #include <QVBoxLayout> 38 #include <QVBoxLayout>
38 #include <QFileDialog> 39 #include <QFileDialog>
39 #include <QPushButton> 40 #include <QPushButton>
40 41
41 static UiObject* create_window(const char *title, void *window_data, bool simple) { 42 static UiObject* create_window(const char *title, void *window_data, bool simple) {
42 CxMempool *mp = cxMempoolCreateSimple(256); 43 UiObject *obj = uic_object_new_toplevel();
43 UiObject *obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject));
44 obj->ctx = uic_context(obj, mp);
45 obj->window = window_data; 44 obj->window = window_data;
46 obj->next = NULL; 45 obj->next = NULL;
47 46
48 QMainWindow *window = new QMainWindow(); 47 QMainWindow *window = new QMainWindow();
49 window->setWindowTitle(title); 48 window->setWindowTitle(title);

mercurial