[Interest] scale all fonts
Manuele Conti
conti.ma at alice.it
Tue Mar 19 12:35:11 CET 2013
Il 19/03/2013 11:27, Hamish Moffatt ha scritto:
> Is it possible to apply a scaling to all font sizes used in an application?
>
> I can see Qt is doing the right thing by converting point sizes to pixel
> sizes in accordance with the DPI of the display. Now suppose I want to
> override the DPI, or redefine point to be other than 1/72" (achieves the
> same). Is this possible?
>
HI I used this way:
I defined a dynamic stylesheet
qApp->setStyleSheet("*[menuHStyle = \"480x272\"] { font: Bold 8pt
\"Currier New\"; }\n"
"*[menuHStyle = \"\"] { font: Bold 14pt \"Helvetica\"; }\n"
"*[menuStyle = \"480x272\" ] { font: Bold 6pt \"Currier New\"; }\n"
"*[menuStyle = \"\"] { font: Bold 11pt \"Helvetica\"; }\n"
"*[voiceStyle = \"480x272\"] { font: 8pt \"Currier New\"; }\n"
"*[voiceStyle = \"\"] { font: 14pt \"Helvetica\"; }\n");
Than I match screen size with style, and I set in widget my dynamic style.
ui->ButNetworkPreferences ->setProperty("menuStyle", Monitor::screenSizeName());
> thanks
> Hamish
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130319/438bc79b/attachment.html>
More information about the Interest
mailing list