How to set font Bold, Italic, and Underlined in Qt?
15,868
See setFontWeight for bold, setFontItalic for italic and setFontUnderline for underline. These methods set the corresponding attribute of the selected text.
Author by
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I want to make a program that's like a simple text editor using Qt 4.6.2.
When the user block any text in a
TextEdit
and click on a button, the text will be bold/italic/underlined depending on the button..I'm a beginner in Qt Programming, so if Possible, can you insert the programming code in Qt to do that?