Golang写Gui的尝试
Tofloor
poster avatar
180******66
deepin
2018-03-11 07:26
Author
Golang写Gui的尝试上次看见有个老哥分享了一个go+h5写客户端的
但是吧我前段时间试过了pyqt5后就想go有没有原生的gui库,然后发现只有用go写qt的,唉,万年绕不过c++/qt
然后就选了
https://github.com/therecipe/qt
但是安装失败,貌似只能用对应版本的qt,文档上是5.10,但是deepin用的是5.6,就想来问问有没有老哥用过的
求一波教育
我知道没有小姐姐你们是不会进来的,所以。。。。
Reply Favorite View the author
All Replies
1 / 2
To page
avatar
q1377195627
deepin
2018-03-11 08:50
#1
本帖最后由 q1377195627 于 2018-3-11 00:53 编辑

arch go 1.10 qt 5.10已经成功编译好几天路过
那个QT_PKG_CONFIG变量必须设置成true,然后他就会自动找路径了。不需要设置QT_DIR啥的

我的变量
export QT_PKG_CONFIG=true
export CGO_CXXFLAGS_ALLOW=".*"
export CGO_LDFLAGS_ALLOW=".*"
export CGO_CFLAGS_ALLOW=".*"



然后三个是解决go1.10(好像是)开始的那个限制
Reply View the author
avatar
180******66
deepin
2018-03-11 08:52
#2
q1377195627 发表于 2018-3-11 00:50
arch go 1.10 qt 5.10已经成功编译好几天路过

羡慕的不行,不晓得我的啥情况
Reply View the author
avatar
q1377195627
deepin
2018-03-11 08:53
#3
https://bbs.deepin.org/post/154062
羡慕的不行,不晓得我的啥情况

这回复速度........
Reply View the author
avatar
vatic
deepin
2018-03-31 04:28
#4
本帖最后由 vatic 于 2018-4-1 14:38 编辑

有要试试这个的吗,

https://github.com/kitech/qt.go

Reply View the author
avatar
jhkwei
deepin
2018-03-31 05:21
#5
感觉用 Qt 写界面还是好些,再用 Go 写后端,中间通过 socket 之类协议联结起来,应该更加高效吧.
Reply View the author
avatar
rekols
deepin
2018-03-31 06:56
#6
golang不适合写gui !!!
golang不适合写gui !!!
golang不适合写gui !!!
Reply View the author
avatar
vatic
deepin
2018-03-31 17:46
#7
继续golang gui!!!
继续golang gui!!!
继续golang gui!!!
Reply View the author
avatar
straydragon
deepin
2018-03-31 18:21
#8
qt自己安装5.10吧,要是商店版本不对应.你可以试试这个http://download.qt.io/archive/qt/,下载对应版本Linux的直接run
Reply View the author
avatar
q1377195627
deepin
2018-04-01 12:20
#9
rekols 发表于 2018-3-30 22:56
golang不适合写gui !!!
golang不适合写gui !!!
golang不适合写gui !!!

然而我就是用go写gui了!!!
然而我就是用go写gui了!!!
然而我就是用go写gui了!!!
Reply View the author
avatar
q1377195627
deepin
2018-04-01 12:21
#10
jhkwei 发表于 2018-3-30 21:21
感觉用 Qt 写界面还是好些,再用 Go 写后端,中间通过 socket 之类协议联结起来,应该更加高效吧. ...

用dbus可能更简单粗暴。,,,
Reply View the author
avatar
q1377195627
deepin
2018-04-01 12:27
#11
vatic 发表于 2018-3-30 20:28
有要试试这个的吗,

https://github.com/kitech/qt.go

这个我之前看过,有点蛋疼,主要是libQt5Inline.so这货。。。。发布软件的时候不好弄,直接扔lib下,可以直接运行。但是有多个需要libQt5Inline.so的软件的话,,,,打的包安装的时候肯定会报错或者警告这个文件已存在,如果扔别的地方,,,,,,就不能直接运行了
Reply View the author
avatar
q1377195627
deepin
2018-04-01 12:28
#12
可以试试gtk那个绑定包。用go写应该没qt那么蛋疼。就是gtk可能有啥东西没qt好做就是了
Reply View the author
avatar
oldfeel
deepin
2018-04-01 12:58
#13
你可以试试这个
https://github.com/asticode/go-astilectron
用 golang 和 electron(js) 写桌面客户端.
Reply View the author
avatar
q1377195627
deepin
2018-04-01 13:20
#14
oldfeel 发表于 2018-4-1 04:58
你可以试试这个
https://github.com/asticode/go-astilectron
用 golang 和 electron(js) 写桌面客户端. ...

js。。。。。。这货坑多。而且go写多了切换到写js会很奇怪,比如go的后端写完了,再去写前端,然后输出一个东西的时候不自觉的写"log."。。。。
Reply View the author
avatar
oldfeel
deepin
2018-04-01 13:28
#15
https://bbs.deepin.org/post/154062
js。。。。。。这货坑多。而且go写多了切换到写js会很奇怪,比如go的后端写完了,再去写前端,然后输出一 ...

你要这样想,用 go/c/c++ 写一个界面需要 1 小时.用 js 写一个界面需要 10 分钟.然后你将来要写 1000++ 个界面.
Reply View the author
avatar
q1377195627
deepin
2018-04-01 13:36
#16
oldfeel 发表于 2018-4-1 05:28
你要这样想,用 go/c/c++ 写一个界面需要 1 小时.用 js 写一个界面需要 10 分钟.然后你将来要写 1000++ 个 ...

不不不。js写一个界面10分钟不够。。。。。js哪有go写起来舒服
Reply View the author
avatar
oldfeel
deepin
2018-04-01 13:52
#17
https://bbs.deepin.org/post/154062
不不不。js写一个界面10分钟不够。。。。。js哪有go写起来舒服

写界面用的不是编程语言,用的是框架/特性.你可以找些 gtk/qt 项目看看界面代码量,然后找个近似的网页看看手工代码量.

前端开发工资低,就是因为复制粘贴比较方便===开发速度快. gtk/qt 没得复制===开发速度慢.
Reply View the author
avatar
electricface
deepin
2018-04-01 15:00
#18
本帖最后由 electricface 于 2018-4-1 07:01 编辑

go以后会支持编译为webasm,到时后可以写web前端。https://blog.csdn.net/john_f_lau/article/details/78855667
Reply View the author
avatar
vatic
deepin
2018-04-01 22:35
#19
https://bbs.deepin.org/post/154062
js。。。。。。这货坑多。而且go写多了切换到写js会很奇怪,比如go的后端写完了,再去写前端,然后输出一 ...

这只能说是你的问题,混合写都可能出现
Reply View the author
avatar
vatic
deepin
2018-04-01 22:35
#20
https://bbs.deepin.org/post/154062
js。。。。。。这货坑多。而且go写多了切换到写js会很奇怪,比如go的后端写完了,再去写前端,然后输出一 ...

混合写都可能出现
好吧,发重了
Reply View the author
1 / 2
To page