hem,
i am also trying the same but for that you have to cross compile the code for rpi so that i can code on PC with QT creator and deploy code on rpi
No. Please read what I wrote again.
I do not cross-compile qt applications on a PC and then move the resultiong executables to the Pi to run.
Rather, I build qt applications on a PC as PC apps. When the code is looking good and tested somewhat on the PC I move the source code to the Pi and rebuild it there. Only requires qmake and make commands.
In short I deploy the source code not cross compiled executables.
Now, if you are talking about building the actual Qt libs that is another question.
In the past I have built Qt5 libs on the Pi itself (Because Qt5 was not available in Jessie or whatever Raspbian version).
To build Qt 5 on the Pi itself I used the uinstructions here:
https://wiki.qt.io/Native_Build_of_Qt5_ ... spberry_Pi
This takes a long time to build but you only have to do it once. Then you can copy the libraries around from Pi to Pi for new deployments.
The build results in a Qt system that is usable from X as normal or directly into the frame buffer (no X required). Also has accelerated OpenGL in the frame buffer.
Note that the instruction for cross-copiling Qt do result in a Qt that is used without X.
'This is not intended for running desktop-style, windowed Qt apps under X11, but rather for the real embedded/device creation use case where the Qt app runs fullscreen on top of dispmanx/EGL using the Broadcom drivers.'