To cross-compile Qt 5.12.0 on PI I followed this tutorial

I made the following edits, though, to compile QtWebEngine too.

Using Raspbian Stretch Lite 2018-11, 4.19.40-v7+

sudo rpi-update

sudo raspi-config
here enable SSH and hardware acceleration; increase GPU ram.

sudo apt-get update
sudo apt-get install g++-multilib python pkg-config gperf bison flex libnss3-dev

Step 1: On RPi
sudo nano /etc/apt/sources.list and uncomment last line
sudo apt-get update
sudo apt-get install libnss3-dev libfontconfig1-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-1-dev libssl-dev

Step 2: on RPI,
sudo mkdir /usr/local/qt5pi
sudo chown pi:pi /usr/local/qt5pi

Step 3: on HOST SYSTEM
mkdir -p ~/raspi/tools
extract in ~/raspi/tools

Step 4: on HOST SYSTEM
rsync -avzR pi@ :/usr/include :/usr/lib :/opt/vc ~/raspi/sysroot
(being my PI ip)

chmod +x
./ sysroot

Step 5: on HOST SYSTEM
wget qt-everywhere-src-5.12.0.tar.xz

Step 6: on HOST SYSTEM
cd qt-everywhere-src-5.12.0

./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtscript -skip qtandroidextras -skip qtcanvas3d -skip qtgamepad -skip qtmacextras -skip qtpurchasing -skip qtquickcontrols -skip qtwinextras -skip qtx11extras -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -no-gbm -nomake examples -nomake tests
(-v to make it verbose)

Check the output to see what will be installed

Step 7: on HOST SYSTEM

make -j 4
(expect to go out of memory; just relaunch)

make install

Launch rsync -avz qt5pi pi@ (to copy the compiled libs to the RPi)