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+

ON RPi:
sudo rpi-update
reboot

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

ON HOST SYSTEM:
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 https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz

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

wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py sysroot

Step 5: on HOST SYSTEM
wget http://download.qt.io/official_releases/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz 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@192.168.120.184:/usr/local (to copy the compiled libs to the RPi)