2013-03-18 65 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

相關問題