From 2dd2b615efe56ae5286538a2769bf7a1ca45335a Mon Sep 17 00:00:00 2001 From: Andrea Decorte Date: Tue, 3 May 2011 18:06:17 +0000 Subject: [PATCH] Show tooltips in the sidebar only in Tabs and IconsOnly modes --- src/widgets/fancytabwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/fancytabwidget.cpp b/src/widgets/fancytabwidget.cpp index b1536ee14..30a340b1d 100644 --- a/src/widgets/fancytabwidget.cpp +++ b/src/widgets/fancytabwidget.cpp @@ -706,7 +706,10 @@ void FancyTabWidget::MakeTabBar(QTabBar::Shape shape, bool text, bool icons, else if (text) tab_id = bar->addTab(label); - bar->setTabToolTip(tab_id, item.tab_label_); + // Adds tooltips only in Tabs mode or IconOnlyTabs mode + // TODO in tab mode, show only if not elided, complicated since this doesn't inherit from QTabWidget + if (shape == QTabBar::RoundedNorth && ((!text && icons) || (text && !icons))) + bar->setTabToolTip(tab_id, item.tab_label_); } bar->setCurrentIndex(stack_->currentIndex());