Peter Kümmel wrote:
Abdelrazak Younes wrote:
Peter Kümmel wrote:
Abdelrazak Younes wrote:
Try to inverse the two lines:
paint_device_ = QPixmap(viewport()->width(), viewport()->height());
verticalScrollBar()->setPageStep(viewport()->height());
Does not help.
I guess the "verticalScrollBar()->setPageStep()" results in a painting
event so paint_device_ is used at the same time it is being re-affected.
If that does not solve the problem, maybe the solution is to use a
shared_ptr<QPixmap> instead of a QPixmap for paint_device_.
But when we reset the shared_ptr with a new QPixmap what should we
do with the old one?
Scratch it. shared_ptr::reset(new QPixmap(...)) will do that for you.
I don't think we could just delete it, it's in use, but I will try.
Indeed. Sorry I did not understand your question. Let's going back to
the beginning, we have:
verticalScrollBar()->setPageStep(viewport()->height());
Should do nothing
paint_device_ = QPixmap(viewport()->width(), viewport()->height());
I guess the resizeEvent happens during a paintEvent. This should not
happen because paintEvent has priority other all other events. This
seems like a bug of the Qt4/MSVC patch to me.
view_.view()->workAreaResize();
This involves a new drawing...
Abdel.