QPainter logs in stdout
Germain Garand
germain at ebooksfrance.org
Tue Jan 19 14:14:59 GMT 2010
Le lundi 18 janvier 2010, Jaime Torres a écrit :
> I have much more info now.
>
> I've modified Qt4.6.1 (yes, installed in /usr/lib/qt4.5) to include a
> kbactrace after every qwarning in QPaint, and here you are why it happens.
> But I get lost and can not fix it.
sorry, I should read core-devel more often.. I supposedly fixed this issue
already (r1076383) but thank you for investigating.
As for the details, if you are interested, it is a bit convoluted...
our widget() is supposed to cover the viewport at all time so there shouldn't
be any paint event for the viewport that would be outside the widget() rect.
but when the widget() is resized to become bigger than the viewport, and we
now scrollbars are going to automatically appear, and thus that the viewport()
is going to shrink eventually to make room for them, we tend to preemptively
account for the future size of the viewport in the widget if needed.
e.g. viewport 500x500, widget 500x500, document suddenly grows to 1000, thus
resize widget to e.g 483x1000, knowing that the viewport will resize to
483x500 momentarily.
So there is a short transitory moment where the widget is actually smaller
than the viewport, and thus where the viewport might receive a paint event
that we can't service (yes, there definetly should be an assert to this
effect, I will see to it).
Earlier Qt versions didn't send a paint event, Qt 4.6 does.
Greetings,
Germain
More information about the kde-core-devel
mailing list