Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.4.0
-
None
Description
QTabBar: When changing the tab text it should not cause the tabbar to scroll if the tab is still visible.
In the following test case simply scroll and watch it get scrolled back when the timer fires.
Test case main.cpp to reproduce
================================
#include <QtGui>
class MyTabBar : public QTabBar
{
Q_OBJECT
public:
MyTabBar(QWidget *parent = 0) : QTabBar(parent), count(0)
public slots:
void changeText()
private:
int count;
};
class MyTabWidget : public QTabWidget
{
public:
MyTabWidget(QWidget *parent = 0) : QTabWidget(parent) {}
void setTabBar(QTabBar *tb)
};
#include "main.moc"
int main(int argc, char **argv)
{
QApplication a(argc, argv);
MyTabWidget tw;
MyTabBar *mtb = new MyTabBar(&tw);
tw.setTabBar(mtb);
tw.show();
return a.exec();
}