therecipe/qt运行Widgets的example当鼠标移动到窗口程序就崩溃了

xinfeng7312 · · 822 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

根据说明安装了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' ```

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

822 次点击  
加入收藏 微博
1 回复  |  直到 2017-12-20 09:56:54
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传