Oh, in this case you need a hack. You have to subclass the tab widget in order to have access to its QTabBar.
bool TabWidget::hasVisibleScroll()
{
int tabCount = tabBar()->count();
QRect tabBarRect
= tabBar
()->geometry
();
QPoint barTopRight
= tabBarRect.
topRight();
QRect tabRect
= tabBar
()->tabRect
(tabCount
-1);
if( tabRect.topLeft.x() >= barTopRight.x() )
return true;
return false;
}
bool TabWidget::hasVisibleScroll()
{
int tabCount = tabBar()->count();
QRect tabBarRect = tabBar()->geometry();
QPoint barTopRight = tabBarRect.topRight();
QRect tabRect = tabBar()->tabRect(tabCount-1);
if( tabRect.topLeft.x() >= barTopRight.x() )
return true;
return false;
}
To copy to clipboard, switch view to plain text mode
regards
Bookmarks