4 Quick tips to adjust Font Size.


Use QFont class

 

When you know font size in terms of Integer ,
  1. void QFont::setPointSize ( int pointSize )

Sometimes , it is required that we need font size other than the prescribed sizes.

  1. void QFont::setPointSizeF ( qreal pointSize )
is really useful in that manner.

Stylesheet

Using style sheet must be the simplest way.

  1. void setStyleSheet ( const QString & sheet )
  2. label->setStyleSheet ("Font : 12pt");
________________________________________________

We can use HTML tags as well, when applicable.

________________________________________________

No comments:

Post a Comment