当我尝试运行以下 golang 代码时,终端中的输出为“退出状态 3221225477”。然后程序关闭。我正在使用 fyne GUI 包。你能帮我解决这个问题吗?包主
import (
"net/url"
"fyne.io/fyne"
"fyne.io/fyne/app"
"fyne.io/fyne/layout"
"fyne.io/fyne/theme"
"fyne.io/fyne/widget"
)
func main() {
app := app.New()
app.Settings().SetTheme(theme.LightTheme())
entry := widget.NewEntry()
entry.SetText("Path")
w := app.NewWindow("Hello")
link, err := url.Parse("https://www.inovatian.com/")
if err != nil {
fyne.LogError("Could not parse URL", err)
}
w.SetContent(widget.NewVBox(
widget.NewLabelWithStyle("Welcome to Inovatian App",
fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
layout.NewSpacer(),
widget.NewHyperlinkWithStyle("inovatian", link, fyne.TextAlignCenter,
fyne.TextStyle{}),
layout.NewSpacer(),
widget.NewGroup("",
fyne.NewContainerWithLayout(layout.NewGridLayout(2),
widget.NewButton("Next", func() {
app.Quit()
}),
widget.NewButton("Cancel", func() {
app.Quit()
}),
),
),
))
w.CenterOnScreen()
w.Resize(fyne.NewSize(240, 180))
w.ShowAndRun()
}
喵喵时光机
米脂
相关分类