Get QPlainTextEdit's structure



  • I have a QPlainTextEdit. It has a text, which contains parts with different fonts. I want to go through the text and know the fonts.
    I digged in QPlainTextEdit' document and found I can go through QTextBlocks. But my text contains only one QTextBlock which contains one QTextCharFormat. I didn't find any way.
    So, can anyone help me? How to get fonts of text blocks in QPlainTextEdit?



  • Hi,

    how its name say end itd documentation says

    bq. The QPlainTextEdit class provides a widget that is used to edit and display plain text.

    So it uses only one TextBlock and TextFormat.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.