[Qt] About bug in GetClientBounds that leads to incorrect InvalidateRect behavior
Paul Ishenin
ip at kmiac.ru
Wed Apr 2 05:35:48 CEST 2008
Luiz Americo Pereira Camara wrote:
> I reported the cited bug, but i can't comment in bugtracker because i'm
> having troubles to access *.freepascal.org sites, so i'm commenting here.
>
> I saw that a fix was committed, but i found a simpler fix.
>
> The problem is that when getting the value from the
> TQtViewport.GetClientBounds the bounds margin are not computed by
> QWidget_contentsRect. Calling the TQtWidget.GetClientBounds directly,
> the bounds margin are computed.
> But unlike TQtViewport.GetClientBounds, TQtWidget.GetClientBounds does
> not compute the scrollbars size (a bug reported by me also). There's no
> difference is both code except that when calling TQtViewport it uses the
> viewPort widget instead of the main widget.
>
> The attached patch fixes both issues. Basically it removes some code
> making TCustomControl follows the same path as other TWinControl.
> It comments TQtViewPort.GetClientBounds since it does nothing.
>
> The patch was created with a LCL version previous to the current commit
> (that can be discarded) so may have some conflicts because i can't
> access the svn server.
I cant remember what was the reason that code become splitted for
TCustomControl. There was some problems with synedit or so. But I
removed that split as you suggested and I dont see any problems. So I
applied it in r14724 (but you get all responsibility if something will
go wrong :) ).
Best regards,
Paul Ishenin.
More information about the Qt
mailing list