From 6ed51553ac263f09ddae706c7517c72a5b4162f7 Mon Sep 17 00:00:00 2001 From: mappu Date: Thu, 3 Oct 2024 19:32:05 +1300 Subject: [PATCH] uic: support elements --- cmd/miqt-uic/ui2go.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cmd/miqt-uic/ui2go.go b/cmd/miqt-uic/ui2go.go index 536e7a0..6ef3295 100644 --- a/cmd/miqt-uic/ui2go.go +++ b/cmd/miqt-uic/ui2go.go @@ -341,8 +341,18 @@ func generateWidget(w UiWidget, parentName string, parentClass string) (string, } // Columns - // TODO - // w.Columns + + for colNo, col := range w.Columns { + + for _, prop := range col.Properties { + if prop.Name == "text" { + ret.WriteString("ui." + w.Name + ".HeaderItem().SetText(" + fmt.Sprintf("%d", colNo) + ", " + generateString(prop.StringVal, w.Class) + ")\n") + } else { + ret.WriteString("/* miqt-uic: no handler for column property '" + prop.Name + "' */\n") + } + } + + } // Recurse children var (