hide the label completely when no image is set. makes sure there isn't layout().spacing() extra padding
This commit is contained in:
parent
3956daeb58
commit
d1cdb6c7d2
@ -304,7 +304,12 @@ void ToolTip::setContent(QObject *tipper, const ToolTipContent &data)
|
||||
{
|
||||
//reset our size
|
||||
d->text->setContent(data);
|
||||
if (data.image().isNull()) {
|
||||
d->imageLabel->hide();
|
||||
} else {
|
||||
d->imageLabel->show();
|
||||
d->imageLabel->setPixmap(data.image());
|
||||
}
|
||||
|
||||
if (data.highlightWindows() && !data.windowsToPreview().isEmpty()) {
|
||||
WindowEffects::highlightWindows(winId(), QList<WId>() << winId() << data.windowsToPreview());
|
||||
|
Loading…
Reference in New Issue
Block a user