From d32782a91982c50c72aed170f3bab2024ff8b4f3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 5 May 2009 20:24:54 +0200 Subject: Show text in tabs of a QTabBar while compileing with QT_NO_TABWIDGET Spotted by looking at the code Reviewed-by: bnilsen --- src/gui/widgets/qtabbar.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 49de8c1..ce1ac09 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -176,12 +176,11 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const if (tw->cornerWidget(Qt::TopRightCorner) || tw->cornerWidget(Qt::BottomRightCorner)) option->cornerWidgets |= QStyleOptionTab::RightCornerWidget; } +#endif QRect textRect = style()->subElementRect(QStyle::SE_TabBarTabText, option, this); - option->text = fontMetrics().elidedText(option->text, d->elideMode, textRect.width(), Qt::TextShowMnemonic); -#endif } /*! -- cgit v0.12