The Font Combo Box
widget, as the name suggests, displays a list of font styles to choose from. The chosen font style can be applied to the desired content if required.
To understand the workings of the Font Combo Box
widget practically, let's create a recipe. This recipe will display a Font Combo Box
widget and a Text Edit
widget. The user will be able to type the desired content in the Text Edit
widget. After typing the text in the Text Edit
widget, when the user selects any font style from the Font Combo Box
widget, the selected font will be applied to the content typed into the Text Edit
widget.
Here are the steps to display an active Font Combo Box
widget and to apply the selected font to the text written in the Text Edit
widget:
- Create a new application of the
Dialog without Buttons
template and drag twoLabel
widgets, aFont Combo Box
widget, and aText Edit
widget from theWidget
box and drop them onto the form. - Set the text property...