Qt can't find GL/gl.h but libGL.so exists
Regarding to for Qt doc:
The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development environment is still straightforward.
Use the following commands to install the basic requirements for building Qt applications:
sudo apt-get install build-essential libgl1-mesa-dev
Ah, as @steeldriver points out, headers and libraries are different things, and doing the following fixed the issue:
sudo apt-get install mesa-common-dev
This installs the required headers.