uic: support <column> elements

This commit is contained in:
mappu 2024-10-03 19:32:05 +13:00
parent 8d07be763a
commit 6ed51553ac

View File

@ -341,8 +341,18 @@ func generateWidget(w UiWidget, parentName string, parentClass string) (string,
} }
// Columns // 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 // Recurse children
var ( var (