title: Running simple Qt GUI application in Go
body: <p>I am trying to modify following simple code from <a href="https://doc.qt.io/archives/3.3/tutorial1-01.html" rel="nofollow noreferrer">here</a> to use Qt in Go.</p>
  
  <pre><code>#include &lt;qapplication.h&gt;
  #include &lt;qpushbutton.h&gt;
  int main( int argc, char **argv )
  {
      QApplication a( argc, argv );
  
      QPushButton hello( "Hello world!", 0 );
      hello.resize( 100, 30 );
  
      a.setMainWidget( &amp;hello );
      hello.show();
      return a.exec();
  }
  </code></pre>
  
  <p>My <a href="https://golang.org/" rel="nofollow noreferrer">Go (Golang)</a> code is: </p>
  
  <pre><code>package main
  import (
      "github.com/therecipe/qt"
      "github.com/therecipe/qt/widgets"
  )
  func main() {
      a := qt.NewQApplication(len(os.Args), os.Args) //ch: widgets.NewQ..
      hello := widgets.QPushButton( "Hello world!", 0 )
      a.setMainWidget( &amp;hello )
      hello.Show()
      a.Exec()
  }
  </code></pre>
  
  <p>However, I get following error: </p>
  
  <pre><code># github.com/therecipe/qt/core
  core.cpp:9:30: fatal error: QAbstractAnimation: No such file or directory
   #include &lt;QAbstractAnimation&gt;
                                ^
  compilation terminated.
  </code></pre>
  
  <p>I have installed Qt bindings in Go using command: </p>
  
  <pre><code>go get "github.com/therecipe/qt"
  </code></pre>
  
  <p>I am working on Debian9 Linux and have following Qt4 packages installed: </p>
  
  <pre><code>libntrack-qt4-1         016-1.3         016-1.3         016-1.3         install
  libqt4-dev              4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  libqt4-dev-bin          4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  libqt4-opengl-dev       4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  python-qt4              4.11.4+dfsg-2+b1        4.11.4+dfsg-2+b1        4.11.4+dfsg-2+b1        install
  qt4-default             4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  qt4-linguist-tools      4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  qt4-qmake               4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 4:4.8.7+dfsg-11 install
  ruby-qt4                4:4.14.3-1+b3   4:4.14.3-1+b3   4:4.14.3-1+b3   install
  </code></pre>
  
  <p>Where is the problem and how can it be solved? Thanks for your help.</p>
  
  <p>Edit: For installing, I followed commands at <a href="https://github.com/therecipe/qt/wiki/Installation-on-Linux" rel="nofollow noreferrer">https://github.com/therecipe/qt/wiki/Installation-on-Linux</a> [Your system package managers version (without Android support)]. However, the command qtsetup gives following output with error: </p>
  
  <pre><code>$ sudo /home/abcde/go/bin/qtsetup
  ERRO[0000] failed to run command                         _func=RunCmd cmd="go env GOMOD" dir= env= error="exec: \"go\": executable file not found in $PATH" name=GOMOD
  </code></pre>