Skip to content

关于GridLayout的一处错误 #49

Description

@yizheneng

ui.Run(func() {
widget := ui.NewWidget()
gBox := ui.NewGridLayout()
widget.SetLayout(gBox)
widget.Show()
})
添加其他布局没有问题,只有GridLayout 这样
.\main.go:17: cannot use gBox (type *ui.QGridLayout) as type ui.QLayoutInterface in argument to widget.SetLayout:
*ui.QGridLayout does not implement ui.QLayoutInterface (wrong type for AddItem method)
have AddItem(*ui.QLayoutItem, int32, int32, int32, int32, ui.Qt_AlignmentFlag)
want AddItem(*ui.QLayoutItem)

下面这样就没有问题:
ui.Run(func() {
widget := ui.NewWidget()
gBox := ui.NewGridLayoutWithParent(widget)
fmt.Println(gBox)
widget.Show()
})

很喜欢这个项目希望作者可以持续更新

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions