在开发的过程中,我们会用到点击切换page,来响应对应的事件,例如以下事件:
头文件中:
void ribboncurrentPageIndexChanged(int index);
实现文件中:
connect(ribbonBar(), SIGNAL(currentPageIndexChanged(int)), this, SLOT(ribboncurrentPageIndexChanged(int)));
void QtitanRibbon5Demo::ribboncurrentPageIndexChanged(int index)
{
switch (index)
{
case 0:
{
int y = 0;
break;
}
case 1:
{
int y = 0;
break;
}
default:
break;
}
}