mirror of
https://github.com/mappu/miqt.git
synced 2024-12-31 12:48:37 +00:00
uic: add extra AddWidget() calls for QSplitter/QStackedWidget
This commit is contained in:
parent
699f1389e2
commit
a0a4624563
@ -321,6 +321,15 @@ func generateWidget(w UiWidget, parentName string, parentClass string) (string,
|
|||||||
setCentralWidget = true
|
setCentralWidget = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if w.Class == "QSplitter" || w.Class == "QStackedWidget" {
|
||||||
|
// We need to manually AddWidget on every child of QSplitter
|
||||||
|
if child.Class == "QWidget" {
|
||||||
|
ret.WriteString(`ui.` + w.Name + `.AddWidget(ui.` + child.Name + `)` + "\n")
|
||||||
|
} else {
|
||||||
|
ret.WriteString(`ui.` + w.Name + `.AddWidget(ui.` + child.Name + `.QWidget)` + "\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if w.Class == "QMainWindow" && child.Class == "QMenuBar" && !setMenuBar {
|
if w.Class == "QMainWindow" && child.Class == "QMenuBar" && !setMenuBar {
|
||||||
ret.WriteString(`ui.` + w.Name + `.SetMenuBar(ui.` + child.Name + `)` + "\n")
|
ret.WriteString(`ui.` + w.Name + `.SetMenuBar(ui.` + child.Name + `)` + "\n")
|
||||||
setMenuBar = true
|
setMenuBar = true
|
||||||
|
Loading…
Reference in New Issue
Block a user