Intro to GUI with QT 4.7 and OpenGL
QT 4.7 is a pain to install - luckily this Dockerfile
should take care of everything for you in that regard.
You could have other projects in subdirectories under app/
. Just pass in the build directory as the BUILDDIR
arg:
docker build . -t qt --build-arg BUILDDIR=spin-slide
You'll need to set up X11 Forwarding. On MacOS I used this article. Here is the short version of the set up from the article:
brew install socat
brew cask install xquartz
!!IMPORTANT!! You need to log out of MacOS before proceeding!
Then open Xquartz and enable allow connections from network clients.
open -a Xquartz
Leave Socat running in a shell:
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
Get your inet IP address:
ifconfig en0
Start up the container, (with subproject path if needed):
docker run -e DISPLAY=IP_ADDRESS:0 qt:latest