Below you can see the front-view size comparison of the Leica Q and Sony A9. The Sony A9 is 3 mm narrower and 30 mm thinner than the Leica Q but it is also 16 mm taller.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.