Below you can see the front-view size comparison of the Sony RX10 IV and Leica Q2. The Leica Q2 is clearly the smaller of the two cameras. Its body is 3 mm narrower, 14 mm shorter and 53 mm thinner than the Sony RX10 IV.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.