Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Canvas Mouse event

11 views
Skip to first unread message

Jeff

unread,
Jan 17, 2006, 4:50:14 PM1/17/06
to
Hi, im a total newbie to QT. Trying to pick up how to capture
mouse events located in a Q3Canvas (or any canvas at this point).
Ive been reading that QWidgets can catch mouse events, but
can Canvas class do so also? If so how?

Im assuming I need to setup a QEvent and somehow use connect(),
but not sure how, if at all.

Thank you for your help.

Jeff

unread,
Jan 18, 2006, 8:59:14 PM1/18/06
to
Ok I figured it out. I needed to subclass from Q3CanvasView and pickup
the events there and loop
through the iterator as QT suggested.

iv1net

unread,
Apr 24, 2006, 1:04:22 PM4/24/06
to
Look at the class hierarchy in the source... for QTwidgets
it has a class that handles mouse mappings... it is what connect
slots map into.. when you set up the event handler... i have not
peeked but you could hi jack the code from their if the QTCanvas
does not support it... it should only a little code.. if its not
their already...
or look at the QT4 mouse model it has a little more stuff in it..
download from trolltech as opensource license...
regards, iv1net
0 new messages