QTextDocument printing - specify font size?
No matter what I try, I cannot modify the base font size from the programmed defaults. What is the proper way given:
Code:
.arg("1")
.arg("2")
.arg("3")
.arg("4");
//1
document.setHtml(allText);
//2
document.print(&printer);
Calling setDefaultFont() at location #1 or #2 have no effect for me. I've also tried using a textedit and setFontPointSize(). I wish to provide the base font,a nd let the document modify it from there, as it uses relative sizing and other styles.
Re: QTextDocument printing - specify font size?
Re: QTextDocument printing - specify font size?
Quote:
Originally Posted by
wysota
No dice. I added:
Code:
document.setDefaultStyleSheet("* {font-size: 24}");
I also tried variations (*=body, p, no selector and no{ }, etc). Is my style sheet syntax wrong?
Re: QTextDocument printing - specify font size?
I don't think this is enough, but let's now assume it is. When did you apply the stylesheet?