Does anyone know how to specify the height of a QGraphicsTextItem? I've tried a number of ways and nothing seems to work.
text.
document()->setPageSize
( QSizeF( 300,
40) );
qreal w = text.document()->size().width(); // 300 - correct
qreal h = text.document()->size().height(); // 22 - why???
QGraphicsTextItem text;
text.document()->setPageSize( QSizeF( 300,40) );
qreal w = text.document()->size().width(); // 300 - correct
qreal h = text.document()->size().height(); // 22 - why???
To copy to clipboard, switch view to plain text mode
I've also tried setting the size property directly on QTextDocument but the same thing happens, it accepts the width but not the height.
Bookmarks