implement ui_customwidget_create (QT)

4 days ago

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 01 Apr 2025 21:59:15 +0200 (4 days ago)
changeset 545
36d26ec9225f
parent 544
d241dcb2cbb5
child 546
5b00f1e55f4e

implement ui_customwidget_create (QT)

ui/qt/widget.cpp file | annotate | diff | comparison | revisions
--- a/ui/qt/widget.cpp	Tue Apr 01 21:58:09 2025 +0200
+++ b/ui/qt/widget.cpp	Tue Apr 01 21:59:15 2025 +0200
@@ -32,7 +32,11 @@
 #include "../common/context.h"
 
 UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) {
-    
+    UIWIDGET widget = create_widget(obj, args, userdata);
+    UiContainerPrivate *ctn = ui_obj_container(obj);
+    UI_APPLY_LAYOUT(ctn->layout, args);
+    ctn->add(widget, false);
+    return widget;
 }
 
 UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) {

mercurial