Use a custom delegate with reimplemented sizeHint.