For long I looked for a working tutorial to build Qt5 with YOCTO (Yocto Training - HOME) both the libraries for the board image and also a toolchain to build Qt5 applications for the board.
See the full tutorial here:
Building Qt5 using yocto on Wandboard - Wandboard Wiki
The Tutorial is written for the Wandboard that also uses an i.MX6 CPU but you can adapt the tutorial for most of the boards of the i.MX6 family I think - in my case it worked with the i.MX6 SABRE AI without problems.
You only have to adjust the sysroot and maybe also the toolchain-path because the wiki entry is a little bit older :smileyhappy:
Ask your questions for this topic - maybe I can help.