Using Ubuntu SDK IDE (QT Creator) for Go GUI apps

agolangf · · 749 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I recently came across the Ubuntu SDK IDE and I notices that the IDE has an option called &#39; Go App with QML GUI&#39;. After selecting this option the IDE sets a base directory with the project files including a main.go file, a .qml file and some setting files.</p> <p>After setting the project I tried to build and run, but I got an error:</p> <pre><code>package gopkg.in/qml.v0/tref: C source files not allowed when not using cgo or SWIG: tref.c </code></pre> <p>The project tries to download the go-qml binding project to the project directory. I saw at their github page that they are working with a new version, so I changed the package specification from v0 to v1 in the .goproject file and in the main.go file. Now, if I try to build, the compiler emits an error regarding the first line inside the main function, something about the qml.Init(nil) function, so I commented that.</p> <p>Now the project builds with no errors, but then I have another problem. When I open the .qml project there is an error pointing to the import statement:</p> <pre><code>import Ubuntu.Components 1.3 </code></pre> <p>Clicking on the Design tab, the error message says:</p> <pre><code>&#34;QML modules not found (...) for qmake project, use QML_IMPORT_PATH variable to add import paths&#34; </code></pre> <p>And this is were I&#39;m stuck. I&#39;m not sure who to set up this and where to add the import path.</p> <p>I&#39;m not sure were this is going to take me, but it looks like this is a good platform to develop GUI apps for GO language using a Designer, but unfortunately this doesn&#39;t seems to be ready to use.</p> <p>Any comments?</p>

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

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