PDA

View Full Version : Default to specific tab within tab widget



scott_hollen
1st March 2011, 00:29
Just got news of a spec change to an app I'm working on...

I have an icon that when clicked will display a tab widget with several tabs. Apparently I'm supposed to display a different default tab based on a user access level to the software (an admin level should default to the first tab, next level of access default to the 2nd tab).

Is there anyway to control which tab is displayed? I'm using a clicked() signal on my icon and show() slot on the tab widget, but is it possible drill down to to the specific tab? I can't find anything anywhere...I'm moving amongst tabs fine but I'm lost on this...


scott

stampede
1st March 2011, 00:36
What about QTabWidget::setCurrentIndex (http://doc.qt.nokia.com/latest/qtabwidget.html#currentIndex-prop) ?