sizeHint() is probably ok but there is certainly some spacing involved. Look into Qwt source code to see how to calculate everything.