[Interest] How to use QStyle::sizeFromContents on a QFrame - missing CT_Frame?
Tony Rietwyk
tony at rightsoft.com.au
Thu Feb 18 08:59:09 CET 2016
Hi Everybody,
I have a QFrame derived widget that is styled by a global stylesheet that
sets padding, border width, etc. When I know the size of the contents, what
do I pass as ContentsType to get the adjusted size to use as
minimumSizeHint?
Using style()->sizeFromContents( CT_ToolButton, nullptr, contentsSize, this
) almost works, but it returns values that are several pixels too big.
Regards,
Tony
More information about the Interest
mailing list