[Qt-interest] qwidget grabmouse weird behaviour

Ankit Agarwal ankit17.ag at gmail.com
Mon Mar 30 14:19:35 CEST 2009


I am sorry but i didnt get what exactly do u mean by that.

On Mon, Mar 30, 2009 at 5:42 PM, Giancarlo Amati <ilferraresebono at hotmail.it
> wrote:

>  mmmm sounds good to me, but mapTo or any others map...refferted to the
> widget or to the main window where my widget is the central one....sorry I'm
> very new to QT.
>
> Kind Regards.
> GC.
>
> ------------------------------
> Date: Mon, 30 Mar 2009 17:36:25 +0530
> Subject: Re: [Qt-interest] qwidget grabmouse weird behaviour
> From: ankit17.ag at gmail.com
> To: ilferraresebono at hotmail.it
> CC: qt-interest at trolltech.com
>
>
> Can't the point obtained here be mapped to the widgetby using mapTo(QWidget
> *, const QPoint &)
>
> 2009/3/30 Giancarlo Amati <ilferraresebono at hotmail.it>
>
>  Hello everybody,
>
> QVTKWidget is a class derived from QWidget...and I'm using the fuction
> grabMouse to detect the position of the mouse.
> Now, I would love the position of the cursor respect the position and the
> dimension of the widget and not respect my screen resolution, infact:
>
> _ui->qvtkWidget->grabMouse(mc);
>  QPoint p = mc.pos();
>  printf("Point: %d %d", p.x(), p.y());
>  _ui->qvtkWidget->releaseMouse();
>
> where qvtkWidget is the widget. Now mc is filled up with my the position of
> the mouse respect to the dimensions and resolution of the screen and not
> respect to the widget itself.
> WHY?
>
> Kind Regards.
> Giancarlo
>
> ------------------------------
> Chiavette USB. addio! Attiva SkyDrive!<http://clk.atdmt.com/GBL/go/136422321/direct/01/>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
>
> --
> Regards,
> Ankit Agarwal
> SW Engineer
> Vegayan Systems
> email : ankit_agarwal at vegayan.com
> Blog : http://ankit17.wordpress.com
>
> ------------------------------
> Organizza, modifica e condividi le tue foto. Scarica Raccolta foto!<http://clk.atdmt.com/GBL/go/136430508/direct/01/>
>



-- 
Regards,
Ankit Agarwal
SW Engineer
Vegayan Systems
email : ankit_agarwal at vegayan.com
Blog : http://ankit17.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090330/94ea54db/attachment.html 


More information about the Qt-interest-old mailing list