c++ - How I can dynamically change font in Qt application? -
i have qt 5.5 application lot of widgets. each widget has self font family draw text. of them defined in qss file, set directly qpainter.
application has localization languages. 1 of language should change font family widget dynamically (all widgets should have 1 font family) , revert changes other languages.
you can use qapplication::setfont()
set default font multiple widgets @ once, can either use set default font everything, or set specific widget class, if pass class secont parameter. note can not used @ same time stylesheets.
if want set default font 1 specific widget, can use widget's setfont()
function well. note if widget setting font have stylesheet attached, in case of conflicting properties values stylesheet used.
Comments
Post a Comment