2013-03-18 63 views

回答

0

那么,你可以尝试通过代码缩放值,然后插回样式表。

//nFontSize and nSomeFactor are your base font size and factor 
widgetYouWantToSetFontSizeFor->setStyleSheet("font-size: "+QString::number(scaleUsingSomeFactor(nFontSize, nSomeFactor))+"pt;"); 

虽然,我不确定你在找什么。

+0

这不提供问题的答案。一旦你有足够的[声誉](https://stackoverflow.com/help/whats-reputation),你将可以[对任何帖子发表评论](https://stackoverflow.com/help/privileges/comment);相反,[提供不需要提问者澄清的答案](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- I-DO-代替)。 - [来自评论](/ review/low-quality-posts/17402530) – 2017-09-21 11:41:57

相关问题