miqt/cmd/handbindings/main.go

36 lines
386 B
Go
Raw Normal View History

2023-10-22 22:00:00 +00:00
package main
import (
"fmt"
"os"
)
func main() {
app := NewQApplication(os.Args)
2024-08-05 22:24:15 +00:00
_ = app
2023-10-22 22:00:00 +00:00
/*
btn := NewQPushButton("Hello world!", QWidget{})
fmt.Printf("%#v\n", btn)
btn.Show()
*/
wid := NewQWidget()
_ = wid
2024-08-05 22:24:15 +00:00
btn := NewQPushButton("Hello world!", wid)
_ = btn
btn.OnPressed(func() {
fmt.Println("Clicked!")
})
2023-10-22 22:00:00 +00:00
wid.Show()
app.Exec()
fmt.Println("OK!")
}