From 6c041a42324c7cbc1181033ce713097c8c1a6909 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 15 Jan 2009 05:59:07 +0000 Subject: [PATCH] get sizing right when setContent is called and the tip is already visible BUG:180423 svn path=/trunk/KDE/kdelibs/; revision=911227 --- private/tooltip.cpp | 2 ++ tooltipmanager.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/private/tooltip.cpp b/private/tooltip.cpp index 480ec1d25..ecd4ff93c 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -169,6 +169,8 @@ ToolTip::~ToolTip() void ToolTip::checkSize() { //FIXME: layout bugs even on qlayouts? oh, please, no. + d->text->setMinimumSize(0, 0); + d->text->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); d->text->setMinimumSize(d->text->minimumSizeHint()); d->text->setMaximumSize(d->text->maximumSizeHint()); diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 2ecf7fb92..42a7283cb 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -217,6 +217,8 @@ void ToolTipManager::setContent(QGraphicsWidget *widget, const ToolTipContent &d } d->tipWidget->setContent(widget, data); + d->tipWidget->prepareShowing(); + d->tipWidget->moveTo(m_corona->popupPosition(d->currentWidget, d->tipWidget->size())); } }