jgrauman
22nd June 2010, 07:05
Hello,
I'd like to know what is the fastest (in running time, not coding time :) ) way to calculate the width of a piece of rich text? The text will have multiple fonts, so I can't just use QFontMetrics. I can set the text of a qtextdocument and get the width, I can try to use qtextlayout to get the width... Are there any other ways, anyone know what would be fastest?
Thanks.
Josh
I'd like to know what is the fastest (in running time, not coding time :) ) way to calculate the width of a piece of rich text? The text will have multiple fonts, so I can't just use QFontMetrics. I can set the text of a qtextdocument and get the width, I can try to use qtextlayout to get the width... Are there any other ways, anyone know what would be fastest?
Thanks.
Josh