MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / eventFilter

Method eventFilter

src/qt/guiutil.cpp:392–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
393{
394 if(evt->type() == QEvent::ToolTipChange)
395 {
396 QWidget *widget = static_cast<QWidget*>(obj);
397 QString tooltip = widget->toolTip();
398 if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt") && !Qt::mightBeRichText(tooltip))
399 {
400 // Envelop with <qt></qt> to make sure Qt detects this as rich text
401 // Escape the current message as HTML and replace \n by <br>
402 tooltip = "<qt>" + HtmlEscape(tooltip, true) + "</qt>";
403 widget->setToolTip(tooltip);
404 return true;
405 }
406 }
407 return QObject::eventFilter(obj, evt);
408}
409
410void TableViewLastColumnResizingFixer::connectViewHeadersSignals()
411{

Callers

nothing calls this directly

Calls 4

HtmlEscapeFunction · 0.85
typeMethod · 0.80
sizeMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected