Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top