Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QMouseEvent::QMouseEvent ( Type  type,
const QPoint position,
Qt::MouseButton  button,
Qt::MouseButtons  buttons,
Qt::KeyboardModifiers  modifiers 

Constructs a mouse event object.

The type parameter must be one of QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick, or QEvent::MouseMove.

The position is the mouse cursor's position relative to the receiving widget. The button that caused the event is given as a value from the Qt::MouseButton enum. If the event type is MouseMove, the appropriate button for this event is Qt::NoButton. The mouse and keyboard states at the time of the event are specified by buttons and modifiers.

The globalPos() is initialized to QCursor::pos(), which may not be appropriate. Use the other constructor to specify the global position explicitly.

Definition at line 127 of file qevent.cpp.

References QCursor::pos().

    : QInputEvent(type, modifiers), p(position), b(button), mouseState(buttons)
    g = QCursor::pos();

Generated by  Doxygen 1.6.0   Back to index