Programming Qt 5 Using Go

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:

  1. 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.
  2. Checkout go-qt5.
    mkdir -p /home/you/go-qt5
    export GOPATH=/home/you/go-qt5
    go get github.com/salviati/go-qt5
  3. 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.
About these ads

One Response to Programming Qt 5 Using Go

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 29 other followers

%d bloggers like this: