To keep a Stylesheet dynamic regarding DPI settings, I want to set certain parts of it from code.
This works:
my_label->setStyleSheet( QString( "font-size: 30px;" ) );
Yet, this doesn't:
my_label->setStyleSheet( QString( "font-size: %1px;" ).arg( 30 ) );
Can anyone enlighten me, why this is? Running Qt 5.7.
The issue was a combination of two things:
While I did try different combinations (integer values (30), converting to QString first), I did not try using an integer value AND converting it to QString together. So everyone was kinda right. Thanks for the patience.