hide the label completely when no image is set. makes sure there isn't layout().spacing() extra padding

This commit is contained in:
Aaron Seigo 2011-11-30 15:19:29 +01:00
parent 3956daeb58
commit d1cdb6c7d2

View File

@ -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());