MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / setCustomWidget

Method setCustomWidget

ElaWidgetTools/ElaToolTip.cpp:65–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63{
64 Q_D(const ElaToolTip);
65 return d->_toolTipText->text();
66}
67
68void ElaToolTip::setCustomWidget(QWidget* customWidget)
69{
70 Q_D(ElaToolTip);
71 if (!customWidget || customWidget == this)
72 {
73 return;
74 }
75 if (d->_pCustomWidget)
76 {
77 d->_mainLayout->removeWidget(d->_pCustomWidget);
78 d->_pCustomWidget->deleteLater();
79 }
80 d->_toolTipText->hide();
81 d->_mainLayout->addWidget(customWidget);
82 d->_pCustomWidget = customWidget;
83 Q_EMIT pCustomWidgetChanged();
84}

Callers

nothing calls this directly

Calls 2

removeWidgetMethod · 0.80
addWidgetMethod · 0.80

Tested by

no test coverage detected