QStackewidget里那个currentIndex如何用

QStackewidget里那个currentIndex怎么用?
我用designer创建的QStackewidget,在右边的currentIndex里为每一页都设定好了参数,0-9,总共就10页了。

但是现在无论在哪一页
int i;
i = currentIndex();
返回的都是0.

我用ui.label->setNum(i);显示,无论在哪一页都是显示0.

我用的是timeout来更新时间,就在timeout的槽函数里用currentIndex,所以时间就只有第0页可以实时改变,其他页面都无法显示。

不知道为什么?????

------解决方案--------------------
currentIndex : int
This property holds the index position of the widget that is visible.
The current index is -1 if there is no current widget.
By default, this property contains a value of -1 because the stack is initially empty.
Access functions:
int currentIndex () const
void setCurrentIndex ( int index )
------解决方案--------------------
QStackewidget只能靠下面的函数
void setCurrentIndex ( int index )
切换页面,也就是说你没有切换到其它页面,
还在第一个页面上,所以currentIndex ()总是0.