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
  3. Build go-qt5
    You can follow the README file on 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/ together with your Go binaries in the same directory before you can execute the Go binaries.

One Response to “Programming Qt 5 Using Go”

  1. Sky JIA Says:

    Great post

Leave a Reply

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

You are commenting using your 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


Get every new post delivered to your Inbox.

Join 38 other followers

%d bloggers like this: