Screenshot fails from buildroot system

Hello,

With Raspberry Pi2, we are using QT with eglfs support from this repository: GitHub - pbouda/buildroot-qt-dev: A Buildroot config to build an environment for Qt5 development on embedded systems.

I am trying to take a screenshot of the current window. I followed different instructions such as:

http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html

However result from first link is not good:

Second link also fails, with a full black image. Any suggestions is appreciated.

If you want to try yourself, here is the fresh /dev/fb0 data. Please note that resolution is 720x1280:
https://drive.google.com/file/d/0B1kYP2tNh2UxcGtHT251LUtNb1U/view?usp=sharing

Ok, after countless trial and errors, method below seems to work fine. Please note that i had to recompile the buildroot with ffmpeg and fbgrab functionalities.

/home/testApp -platform linuxfb

then

ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 720x1280 -i /dev/fb0 -f 
image2 -vcodec png test%03d.png