[Qt] Qt bindings problem (pretty urgent)

Den Jean Den.Jean at telenet.be
Tue Apr 27 11:24:33 CEST 2010


On Tuesday 27 April 2010 09:25:58 zeljko wrote:
> Hi Den, we have problem with copyQRectToPRect() and copyPRectToQRect().
> It does not set TopLeft() TopRight() values and vice versa.
QRect stores internally everything in a private x1,y1,x2,y2.
 
copyQRectToPRect() and copyPRectToQRect() does modify those.

long ago, we decided to fix two problems: 
  - OsX different memory layout of QRect
  - LCL vs Qt differences with respect to rectangles including or not
    the right/bottom edge:
http://wiki.freepascal.org/Qt4_binding#Solution:Pascalify

TopLeft and TopRight are functions that use these x1,y1,x2,y2. So
whatever is set, these functions will return that, but these functions
will not additionally modify with +1 or -1. (they return what is in QRect)

> I cannot implement viewOrigin functions without it since eg. viewport
>  widget of QAbstractScrollArea can be moved by scrollbars, and it's origin
>  is stored in TopLeft value which is TPoint type (so don't know if this can
>  make problem).
> eg.  QWidget_rect(viewportWidget, @R) correctly returns viewport rect, but
> TopLeft isn't assigned so we cannot know what's current origin of this
> widget.
> Please if you can update bindings ASAP so I can continue with
>  implementation.
> 
> bindings functions that need an update (pascalbind.h)
> copyQRectToPRect()
> copyPRectToQRect()
> 
> thanks
> zeljko
> 
> _______________________________________________
> Qt mailing list
> Qt at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/qt
> 




More information about the Qt mailing list