A modified QLabel class. More...
Publicly inherits QLabel.
MyLabel | ( const char* text, QWidget* parent ); |
virtual void | keyPressEvent | ( QKeyEvent* e ); |
virtual void | mousePressEvent | ( QMouseEvent* e ); |
A modified QLabel class.
This is a modified QLabel class that passes all mousePressEvents and keyPressEvents to its parent. The position of the mouse event is adjusted to be relative to the parents location.Create a MyLabel.
Pass all QKeyEvents to the parent widget.
Pass all QMouseEvents to the parent widget.
The x and y coordinates are adjusted so that they are offsets from the parent widgets upper left corner instead of the childs.