PDA

View Full Version : Determining QTextBlock font



smhall316
19th October 2010, 19:19
I have a qtextblock with multiple different fonts inside of it, I would like to go through each character in the block and determine its font name, size, bold, etc. I have tried using qtextblock's charFormat().font() but it returns one general font despite having different fonts inside the block.

Is what I am trying to do even possible?

Thanks,
Scott

Lykurg
19th October 2010, 22:00
You have to iterate over the QTextFragment's inside your block. The fragments contains the specific font informations.