Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
browser
Package browser provides helpers to open files, readers, and urls in a browser window. (by pkg)
-
qt
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I used QT for my app Wombat, but then rebuilt everything from scratch again using Wails. V1 use webview under the hood, but all the wails tooling makes it really easy/joy to work with. V2 (which is in beta) has it’s own library for interactions with the rendering window and has a lot of nice features like native blur for Mac and support for the menu bar etc. https://wails.app/
Last time I used https://gioui.org/. Worked for me. Documentary isn't that good. But there are a enough examples in the repository.
I still say QT is one of the best out there for Go imo... you will have to do some googling as the docs are lengthy as hell without many good comments. But you can do anything that QT does in any other language. Many times I had to lookup Python or C++ examples and figure it out from there. It always works though. Here's some silly examples: ex1 ex2 The only thing that I don't like about it, is that the first time you build your project a separate binary will be created in your directory for your Golang to work with. I haven't figured out any way around that... so if you package your app, you will have your Golang binary plus a separate qtbox one as well.
fyne.io is probably the best one
You will end up with a single binary that works across all operating systems. Your Go program uses a web server internally to communicate with your web app and to serve static files. To make it really easy for your users use something like https://github.com/pkg/browser to start the default browser with the correct URL when the program starts. It even works offline because all required files come with the go executable.
Do you know if therecipe/qt is still supported? I can see no activity recently.
Why are you people keep recommending fyne.io??? Don't waste your time, just download it's sample demo (1. go get fyne.io/fyne/v2/cmd/fyne_demo/ ; 2. fyne_demo) try it and see for yourself "how good it is" (it's not). Then download Dear ImGui (golangs bindings here: https://github.com/inkyblackness/imgui-go) and compare the quality... it's not even funny how much better it is. So it's just baffling to see at every golang GUI thread people keep recommending Fyne, when alternatives like ImGui exist, which are just astronomically better. Those who recommend, do you even use it yourself or just keep repeating what others suggested somewhere else...?
Unfortunately, the only open-source app that I have is from half a year ago, when I was learning gioui https://github.com/yarcat/playground-gio/tree/master/transition-app Since then my understanding of the fwk and style has changed a lot:
I create an App (or actually ScreenManager) struct (or stateful closure) that contains a global state, and manages screens and their transitions. As I mentioned earlier, I inject callbacks for button handlers. The state-machine for these callbacks is managed by this entity. And I use github.com/yarcat/fsm-go as a state-keeper.