Below you can see the front-view size comparison of the Leica Q2 and Canon RP. The Leica Q2 is 3 mm narrower and 5 mm shorter than the Canon RP but it is also 22 mm thicker.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.