문제

Is it possible to increase/decrease font size by a factor using qss?

도움이 되었습니까?

해결책

The Qt Style Sheets Reference for the font-size property says:

In this version of Qt, only pt and px metrics are supported.

So it still doesn't seem to be possible.

다른 팁

Well, you could try scaling the value through code and then inserting back to stylesheet.

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

Although, I am not sure what you're looking for.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top