Web Analytics Made Easy - Statcounter
Skip to content

Class SBGUIToolTip::GlobalFilter#

ClassList > GlobalFilter

Inherits the following classes: QObject

Public Functions#

Type Name
GlobalFilter (QObject * parent)
Constructs a GlobalFilter for the given parent object (typically the QApplication) and creates a global tooltip instance.
~GlobalFilter () override
Destroys the GlobalFilter and schedules the global tooltip for deletion.

Protected Functions#

Type Name
bool eventFilter (QObject * obj, QEvent * event) override
Event filter for global tooltips.

Public Functions Documentation#

function GlobalFilter#

Constructs a GlobalFilter for the given parent object (typically the QApplication) and creates a global tooltip instance.

explicit GlobalFilter::GlobalFilter (
    QObject * parent
) 

Parameters:

  • parent The parent object for the filter.

function ~GlobalFilter#

Destroys the GlobalFilter and schedules the global tooltip for deletion.

GlobalFilter::~GlobalFilter () override


Protected Functions Documentation#

function eventFilter#

Event filter for global tooltips.

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

Intercepts QEvent::ToolTip events across the application, extracts appropriate tooltip text from item views, menus, toolbars, and generic widgets, and displays a custom SBGUIToolTip. If no tooltip text is found, any visible custom tooltip is hidden and the event is passed to the base implementation.

Parameters:

  • obj The QObject that received the event.
  • event The QEvent to be filtered (expected to be a QHelpEvent for tooltips).

Returns:

true if the event was handled (tooltip displayed or hidden); otherwise false.