Web Analytics Made Easy - Statcounter
Skip to content

Class SBGUIToolTip::TargetFilter#

ClassList > TargetFilter

Inherits the following classes: QObject

Public Functions#

Type Name
TargetFilter (QWidget * target)
Constructs a TargetFilter for the given widget and creates an associated tooltip instance.
~TargetFilter () override
Destroys the TargetFilter and schedules its associated tooltip for deletion.

Protected Functions#

Type Name
bool eventFilter (QObject * obj, QEvent * event) override
Filters events for the target widget to display and hide custom tooltips.

Public Functions Documentation#

function TargetFilter#

Constructs a TargetFilter for the given widget and creates an associated tooltip instance.

explicit TargetFilter::TargetFilter (
    QWidget * target
) 

Parameters:

  • targetWidget The widget to which this filter will be attached.

function ~TargetFilter#

Destroys the TargetFilter and schedules its associated tooltip for deletion.

TargetFilter::~TargetFilter () override


Protected Functions Documentation#

function eventFilter#

Filters events for the target widget to display and hide custom tooltips.

bool TargetFilter::eventFilter (
    QObject * obj,
    QEvent * event
) override

Handles tooltip display on mouse hover and hides the tooltip when the mouse leaves the target or tooltip.

Parameters:

  • obj The object receiving the event (should be the target widget).
  • event The event to filter.

Returns:

true if the event has been handled and further processing should stop; otherwise false.