Download QT everywhere package :
http://download.qt.io/archive/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.zip
Download Raspberry cross compiler :
https://github.com/raspberrypi/tools
dump rootfs from Rasberry SD card
scp pi@XXXXX:/lib /(host_workspace)/lib
scp pi@XXXXX:/usr /(host_workspace)/usr
scp pi@XXXXX:/opt /(host_workspace)/opt
Dowload tslib and compile
CROSS COMPILE QT:
1) uncompress QT package to some where.
/opt/workspace/qt-everywhere-opensource-src-5.7.1
2) make build dir under the QT root dir
set arm-linux-gnueabihf-gcc into $PATH
cp linux-arm-gnueabi-g++ in the qtbase/mkspec as linux-arm-gnueabihf-g++
cp linux-rpi2-g++ in the qtbase/mkspec/device as linux-rpi3-g++
mkdir build
cd build
../configure -release --opensource -confirm-license -shared -no-qml-debug -qt-libpng -qt-libjpeg -qt-freetype -no-glib -no-gtk -nomake examples -no-compile-examples -gui -widgets -tslib -device linux-rpi3-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -linuxfb -sysroot /opt/Rasp/rootfs -no-gstreamer -I /opt/Rasp/tslib/usr/local/include -L /opt/Rasp/tslib/usr/local/lib -xplatform linux-arm-gnueabihf-g++ -skip qtwayland
make ARCH=arm-linux CROSS_COMPILE=arm-linux-gnueabihf-
make install
===========
:~/Downloads/qt-everywhere-src-5.12.5/build$ ../configure -xplatform linux-aarch64-gnu-g++ -release -opensource -confirm-license -shared -confirm-license -I /opt/xxxxx/linux_dev_env/aarch64-linux-gnu/var/include -L /opt/xxxxx/linux_dev_env/aarch64-linux-gnu/var/lib --prefix=/var -no-glib -no-qml-debug -nomake examples -no-opengl -sysroot /opt/xxxxxx/linux_dev_env/aarch64-linux-gnu -skip qtdoc