MyLabel

A modified QLabel class. More...

Publicly inherits QLabel.

Public Methods

MyLabel( const char* text, QWidget* parent );

Protected Methods

virtual voidkeyPressEvent( QKeyEvent* e );
virtual voidmousePressEvent( QMouseEvent* e );

Detailed Documentation

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.

Public Methods Documentation

MyLabel ( const char* text, QWidget* parent );

Create a MyLabel.

Protected Methods Documentation

virtual void keyPressEvent ( QKeyEvent* e );

Pass all QKeyEvents to the parent widget.

virtual void mousePressEvent ( QMouseEvent* e );

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.


Return to Index.
Automatically generated on Dec 29 18:17