Pregunta

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

¿Fue útil?

Solución

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top