Rajesh,
these calls are the member function of QScrollView or QAbstractScrollArea.
I am using QTabWidget class.
Rajesh,
these calls are the member function of QScrollView or QAbstractScrollArea.
I am using QTabWidget class.
I presume you use QTextEdit for showing the text. QTextEdit is a QAbstractScrollArea.
J-P Nurmi
But a tab widget does not automatically adds scroll bars.
You must add them manually.
The only scroll it adds automatically is the scroll for the tab bar widgets.
Could you provide a screenshot?
Or at least make sure of who's adding the scroll bars...
Could it be one of the widgets in the tab widget?
Regards
May be I had framed the query incorrectly. The scroll bar is added automatically by the tab bar widgets, property (use scrollbuttons)
I have also added the screenshot.
Oh, in this case you need a hack. You have to subclass the tab widget in order to have access to its QTabBar.
Qt Code:
bool TabWidget::hasVisibleScroll() { int tabCount = tabBar()->count(); if( tabRect.topLeft.x() >= barTopRight.x() ) return true; return false; }To copy to clipboard, switch view to plain text mode
regards
thanks marcel for the code..
just one thing the line if( tabRect.topLeft.x() >= barTopRight.x(i) ), is giving me the "true" status in both the cases.
In my case the TabWidget is given a resize event during the initialisation of the screen , but the above code always gives the default size, so I have modified the code to the code given below:
if(tabRect.topLeft().x() >= QApplication::desktop()->width() )
The tabbar is resized to desktop's width in the starting.
Bookmarks