Salviati’s go-qt5 project on Github makes it possible to write GUI programs using Qt 5 and Go.
On Mac OS X Mavericks, I tried to build and run some Qt 5.2 programs written in Go. Here follows what I did:
- Install Qt 5.2 using Homebrew.
brew update && brew doctor && brew install qt5
This would warn you that Qt 4 is more widely used than Qt 5. Anyway, go-qt5 is a Go binding of Qt 5.
- Checkout go-qt5.
mkdir -p /home/you/go-qt5
go get github.com/salviati/go-qt5
- Build go-qt5
You can follow the README file on https://github.com/salviati/go-qt5 to build go-qt5 and some example programs. Since Homebrew does not create symbolic links for Qt 5, you need to invoke qmake as /usr/local/Cellar/qt5/5.2.0/bin/qmake. Also, you need to put $GOPATH/src/github.com/salviati/go-qt5/lib/libgoqt5drv.1.0.0.dylib together with your Go binaries in the same directory before you can execute the Go binaries.