Hi,
Thanks for the explanation; I tried most of the ideas, but did not set 'pagesize'. I will set pagesize and see if it helps.
{edited} ok, I solved the problem;
[SOLVED]
THanks,
Kacper
[EDITED]
The ideas are good, but are not working in my code.
Piece of my code
...//_doc is QTextEdit->document();
// When I qDebug()<<_doc it shows multiple lines
// when setting on item the text is only one line.
// I simply need multiple lines of text ( Max 5 lines 20 char each, etc)
{
m_textDoc = _doc->clone();
setDocument(m_textDoc);
document()->setPageSize(_doc->pageSize());
update(boundingRect());
}
...//_doc is QTextEdit->document();
// When I qDebug()<<_doc it shows multiple lines
// when setting on item the text is only one line.
// I simply need multiple lines of text ( Max 5 lines 20 char each, etc)
void MyItem::vUpdateText(QTextDocument* _doc)
{
m_textDoc = _doc->clone();
setDocument(m_textDoc);
document()->setPageSize(_doc->pageSize());
update(boundingRect());
}
To copy to clipboard, switch view to plain text mode
Bookmarks