根据说明安装了QT和therecipe/qt,复制Getting Started第一个例子
成功编辑运行,但当鼠标移到窗口程序就立刻崩溃了
错误信息:
```
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x44bac34]
runtime stack:
runtime.throw(0x4979748, 0x2a)
/usr/local/go/src/runtime/panic.go:605 +0x95
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:351 +0x2b8
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x436f620, 0xc420053d90, 0x1)
/usr/local/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420053d60 sp=0xc420053d20 pc=0x4032664
github.com/therecipe/qt/widgets._Cfunc_QApplication_QApplication_Exec(0x0)
github.com/therecipe/qt/widgets/_obj/_cgo_gotypes.go:8871 +0x49 fp=0xc420053d90 sp=0xc420053d60 pc=0x41cb779
github.com/therecipe/qt/widgets.(*QApplication).Exec(0xc42000e030, 0x1)
/Users/laozihui/Documents/workspace/golang/w1/tmp_pj/src/github.com/therecipe/qt/widgets/widgets.go:9335 +0x22 fp=0xc420053da8 sp=0xc420053d90 pc=0x4258832
helloqt.ShowWidgets(0xc4200101a0, 0x1, 0x1)
/Users/laozihui/Documents/workspace/golang/w1/tmp_pj/src/helloqt/gettingstart.go:58 +0x603 fp=0xc420053ed0 sp=0xc420053da8 pc=0x4344d73
main.main()
/Users/laozihui/Documents/workspace/golang/w1/tmp_pj/src/main.go:82 +0x1e9 fp=0xc420053f80 sp=0xc420053ed0 pc=0x4347d79
runtime.main()
/usr/local/go/src/runtime/proc.go:195 +0x226 fp=0xc420053fe0 sp=0xc420053f80 pc=0x405a206
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420053fe8 sp=0xc420053fe0 pc=0x40825b1
```
操作系统macOS 10.12.6
qtsetup信息:
```
INFO[0000] GOOS: 'darwin'
INFO[0000] GOARCH: 'amd64'
INFO[0000] GOVERSION: 'go1.9.2'
INFO[0000] GOROOT: * '/usr/local/go'
INFO[0000] QT_VERSION: * '5.10.0'
INFO[0000] QT_VERSION_MAJOR: '5.10.0'
```
有疑问加站长微信联系(非本文作者)