From 4a92f11d0031a223aeefdf214a4fb43819f9f5e0 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 10 Oct 2023 21:48:20 -0500 Subject: [PATCH] Resize tooltip label every frame to account for text changes --- scwx-qt/source/scwx/qt/util/tooltip.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scwx-qt/source/scwx/qt/util/tooltip.cpp b/scwx-qt/source/scwx/qt/util/tooltip.cpp index 509a0495..42fcaa4c 100644 --- a/scwx-qt/source/scwx/qt/util/tooltip.cpp +++ b/scwx-qt/source/scwx/qt/util/tooltip.cpp @@ -110,6 +110,7 @@ void Show(const std::string& text, const QPointF& mouseGlobalPos) types::FontCategory::Tooltip); tooltipLabel_->setFont(font); tooltipLabel_->setText(QString::fromStdString(displayText)); + tooltipLabel_->resize(tooltipLabel_->sizeHint()); // Get the screen the label will be displayed on QScreen* screen = QGuiApplication::screenAt(mouseGlobalPos.toPoint());