Skip to content

Installation on Windows

therecipe edited this page Jan 2, 2019 · 31 revisions

Fast track version

If you want to install Go

https://golang.org/doc/install?download=go1.11.2.windows-amd64.msi

If you want to install the binding
go get -u -v github.com/therecipe/qt/cmd/... && for /f %v in ('go env GOPATH') do %v\bin\qtsetup test && %v\bin\qtsetup
  • Use the MinGW shell (%GOPATH%\bin\qtenv.bat) if you want to go run or go build your applications; optional: run setx PATH "%PATH%" inside the shell once to make go run or go build work from within your default CMD or PS as well
If you just want to compile an application
go get -u -v github.com/therecipe/qt/cmd/... && for /f %v in ('go env GOPATH') do %v\bin\qtdeploy test desktop github.com/therecipe/examples/basic/widgets

(replace github.com/therecipe/examples/... with the project you want to compile)


Official version (with Android support)


MSYS2 version (without Android support)

  • Install MSYS2 and export QT_MSYS2=true

  • Open a MinGW shell (the 64-bit version, if you want to deploy 64-bit applications) alternatively export QT_MSYS2_ARCH=amd64 or QT_MSYS2_ARCH=386

  • pacman -Syyu

  • Install Qt

    • to deploy dynamically linked 32-bit applications: pacman -S mingw-w64-i686-qt-creator mingw-w64-i686-qt5

      • optional: install the experimental webkit module: pacman -S mingw-w64-i686-qtwebkit and export QT_WEBKIT=true
    • to deploy dynamically linked 64-bit applications: pacman -S mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5

      • optional: install the experimental webkit module: pacman -S mingw-w64-x86-qtwebkit and export QT_WEBKIT=true
    • to deploy statically linked 32-bit applications: pacman -S mingw-w64-i686-qt-creator mingw-w64-i686-qt5-static

    • to deploy statically linked 64-bit applications: pacman -S mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5-static

  • pacman -Scc

  • Use the MinGW shell for the setup and deployments (the 64-bit version, if you want to deploy 64-bit applications) alternatively export QT_MSYS2_ARCH=amd64 or QT_MSYS2_ARCH=386

  • Export QT_MSYS2_STATIC=true if you want to deploy statically linked applications

  • Install Go: https://golang.org/doc/install?download=go1.11.2.windows-amd64.msi

  • Clone the repo: go get -u -v -tags=no_env github.com/therecipe/qt/cmd/...

  • Run the setup: %GOPATH%\bin\qtsetup.exe


Now that you are done with the installation you can start reading the usage instructions and build the examples.

Clone this wiki locally