Resize tooltip label every frame to account for text changes

This commit is contained in:
Dan Paulat 2023-10-10 21:48:20 -05:00
parent 73adeda604
commit 4a92f11d00

View file

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