bunjee
12th May 2008, 16:04
Hey there,
I'm using a QListView to display a list of QTextDocument based paragraphs.
Everytime I resize my view I have to call : QAbstractListModel::reset(), to update the paragraph's geometry.
here is my paint delegate content :
painter->save();
QTextDocument document;
document.setHtml(mText);
document.setPageSize(QSize(rect.width(), rect.height()));
QAbstractTextDocumentLayout::PaintContext context;
painter->translate(rect.x(), rect.y());
document.documentLayout()->draw(painter, context);
painter->restore();
When resizing my widgets : the view goes blank, until resize is completed.
Is there a way to avoid this ?
I'm using a QListView to display a list of QTextDocument based paragraphs.
Everytime I resize my view I have to call : QAbstractListModel::reset(), to update the paragraph's geometry.
here is my paint delegate content :
painter->save();
QTextDocument document;
document.setHtml(mText);
document.setPageSize(QSize(rect.width(), rect.height()));
QAbstractTextDocumentLayout::PaintContext context;
painter->translate(rect.x(), rect.y());
document.documentLayout()->draw(painter, context);
painter->restore();
When resizing my widgets : the view goes blank, until resize is completed.
Is there a way to avoid this ?