Below you can see the front-view size comparison of the Sony RX100 IV and Leica Q-P. The Sony RX100 IV is clearly the smaller of the two cameras. Its body is 28mm narrower, 22 mm shorter and 52 mm thinner than the Leica Q-P.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.