In this Qt5 GUI i want to show you How To Create QFontDialog. The QFontDialog class provides a dialog widget for selecting a font. A font dialog is created through one of the static getFont() functions. Example:
|
bool ok; QFont font = QFontDialog::getFont( &ok, QFont("Helvetica [Cronyx]", 10), this); if (ok) { // the user clicked OK and font is set to the font the user selected } else { // the user canceled the dialog; font is set to the initial // value, in this case Helvetica [Cronyx], 10 } |
Also …
Read more