Einführung in die Sprache Go anhand von Beispielen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

package gui
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/uitools"
"github.com/therecipe/qt/widgets"
)
func ErzeugeLayout(widget *widgets.QWidget, formWidget *widgets.QWidget, t *[]int, ch chan bool) *widgets.QTextBrowser {
/*
var (
ui_textinputEingabefeld = widgets.NewQTextEditFromPointer(widget.FindChild("textinputEingabefeld", core.Qt__FindChildrenRecursively).Pointer())
ui_buttonAusloeser = widgets.NewQPushButtonFromPointer(widget.FindChild("buttonAusloeser", core.Qt__FindChildrenRecursively).Pointer())
)
ui_buttonAusloeser.ConnectClicked(func(checked bool) {
widgets.QMessageBox_Information(nil, "Titel des Infofensters", ui_textinputEingabefeld.ToPlainText(), widgets.QMessageBox__Ok, widgets.QMessageBox__Ok)
})
*/
var ui_textBrowser = widgets.NewQTextBrowserFromPointer(widget.FindChild("textAusgabefeld", core.Qt__FindChildrenRecursively).Pointer())
ui_textBrowser.SetText("Halo")
var layout = widgets.NewQVBoxLayout()
widget.SetLayout(layout)
layout.AddWidget(formWidget, 0, 0)
widget.SetWindowTitle("go LGL")
widget.Show()
return ui_textBrowser
}
func LeseUIFile(widget *widgets.QWidget) *widgets.QWidget {
var loader = uitools.NewQUiLoader(nil)
var file = core.NewQFile2("./gui/qml/formular.ui")
file.Open(core.QIODevice__ReadOnly)
var formWidget *widgets.QWidget = loader.Load(file, widget)
file.Close()
return formWidget
}