Using QTextEdit, I need to change the font attributes of each paragraph individually. This is similar to how many word processors change the font of the paragraph when the user selects a style from the menu (unspecified formatting).
Ideally, I would like to apply a QTextCharFormat (or equivalent) to the block (paragraph) immediately before it is displayed and displayed , but I would prefer that the font attribute is not inserted in the text, since I do not want this information in the file, but I need save any bold / italic / underlined attributes that the user could set for words in paragraphs (I intend to save the necessary information in QTextBlock :: userData). However, I cannot figure out where I will need to insert a function to complete this task.
I decided that I canβt change the QTextCharFormat of the paragraph from QTextBlock or QTextCursor, since this only applies to new blocks, it does not affect blocks with existing text.
I checked QTextLayout, but I don't think my answer is.
I have been looking for a solution to this problem for several days. I would be very kind to any pointer in the right direction.
I have many years of experience with C ++, but I'm a little new to Qt. Using Qt 4.8.
Edit:
() , . , , , - (, ) . ( ) , , , . Qt , , , . , . , , .