<p>I recently came across the Ubuntu SDK IDE and I notices that the IDE has an option called ' Go App with QML GUI'. 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>"QML modules not found (...) for qmake project, use QML_IMPORT_PATH variable to add import paths"
</code></pre>
<p>And this is were I'm stuck. I'm not sure who to set up this and where to add the import path.</p>
<p>I'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't seems to be ready to use.</p>
<p>Any comments?</p>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传