[Qt] Inverted cursor position on Mac

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Jul 3 22:05:10 CEST 2007


On 7/3/07, Den Jean <Den.Jean at telenet.be> wrote:
> inline void copyQRectToPRect(const QRect &qr, PRect pr)
> {
>   *(QRect *)pr = qr;
>   ((QRect *)pr)->setRight(((QRect *)pr)->right()+1);
>   ((QRect *)pr)->setBottom(((QRect *)pr)->bottom()+1);
>
> }

Here you can fix this by declaring a correct type for pr. Create a
pascal TRect type on the c++ source and use that. No need to type-cast
things.

> inline void copyPRectToQRect(PRect pr, QRect &qr)
> {
>   qr = *(QRect *)pr;
>   qr.setRight(qr.right()-1);
>   qr.setBottom(qr.bottom()-1);
> }

similar here.

-- 
Felipe Monteiro de Carvalho



More information about the Qt mailing list