Qt has an internal collision if you use “width: xxx;” or “height: xxx” in the widgets. The collision is between Qt’s layout system and style sheet handling. It causes Qt incorrectly calculating QScrollBar’s size. Therefore it effected all other widgets along side the scrollbars.

The best solution is: don’t use width or height style in Qt’s widgets. Instead, set them by the SizePolicy, the minimum size and the maximum size.

This took me whole day to figure out the cause by tracing into Qt’s source codes.

This site uses Akismet to reduce spam. Learn how your comment data is processed.