label显示超长省略时,增加tooltips

This commit is contained in:
赵民勇 2022-09-28 17:03:42 +08:00
parent 9ffdddeb4c
commit 68a5346fe5
1 changed files with 2 additions and 0 deletions

View File

@ -152,4 +152,6 @@ void LeftsiderbarWidget::paintEvent(QPaintEvent *event)
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
m_titleLabel->setElidedText(tr("Backup & Restore")); m_titleLabel->setElidedText(tr("Backup & Restore"));
if (m_titleLabel->text() != tr("Backup & Restore"))
m_titleLabel->setToolTip(tr("Backup & Restore"));
} }