ui/qt/window.cpp

changeset 519
8884c7fbe4cb
parent 516
4b31c74666d7
child 520
ea1bba55de44
--- a/ui/qt/window.cpp	Wed Mar 26 21:15:20 2025 +0100
+++ b/ui/qt/window.cpp	Wed Mar 26 21:47:04 2025 +0100
@@ -36,8 +36,9 @@
 
 #include <QVBoxLayout>
 #include <QFileDialog>
+#include <QPushButton>
 
-static UiObject* create_window(char *title, void *window_data, bool simple) {
+static UiObject* create_window(const char *title, void *window_data, bool simple) {
     CxMempool *mp = cxMempoolCreateSimple(256);
     UiObject *obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject));
     obj->ctx = uic_context(obj, mp);
@@ -45,6 +46,7 @@
     obj->next = NULL;
     
     QMainWindow *window = new QMainWindow();
+    window->setWindowTitle(title);
     obj->widget = window;
     
     /*
@@ -64,7 +66,7 @@
     return obj;
 }
 
-UiObject* ui_window(char *title, void *window_data) {
+UiObject* ui_window(const char *title, void *window_data) {
     return create_window(title, window_data, FALSE);
 }
 

mercurial