Q:

Qt: get snapshot of all visible window running in Xorg? 

I know how to retrieve snapshot of current window with its WId , but how can I find the list of WId e.g of all window present on this desktop , so that I could find all the snapshots. 

A:

You may want to just take a snapshot of the root window. 
If you need a list of all windows, use XQueryTree on the root window.  Bear in mind that a partially obscured window will still be obscured on any snapshot.