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.
Peter

Reply via email to