[Qt] Qt bindings problem (pretty urgent)

Den Jean Den.Jean at telenet.be
Tue Apr 27 21:20:35 CEST 2010


On Tuesday 27 April 2010 18:23:34 zeljko wrote:
> I don't understand what you want to say. 
:-) idem dito
> Are you saying that our rect
> conversion is ok ? (I don't care for +1 -1 at the moment).
I was explaining how Qt class qrect is used in binding. By using a 
pascal record with the same binary layout as the QRect Qt Class.
Only when a qrect is returned by any qt call, the binding first
calls the copy...rect... functions to fix for the +1/-1 and different OsX 
binary layout.
If you use the topleft (and other functions of qrect), they
return the coordinates in the struct/record (w/o the +1/-1). 
In most cases this is what you want.

> QAbstractScrollArea->viewport() uses TopLeft for information about viewport
> origin when we ask QWidget_rect(viewport, @R);
> When we move scrollbar , viewport moves, QWidget_rect() is always same, but
> viewport is changing QRect topLeft value (according to qt code).
> 
> If we move viewport (eg. by scrolling) qt code says that TopLeft = (0, -20)
>  in qt bindings it says TopLeft = (0,0).
I am not sure what you mean by qt code and qt binding. 
perhaps you should adapt a small fpc qt4 demo and add
 some code that demoes your problem. 
> I'll try to add it to bindings just to see if it works.





More information about the Qt mailing list