How to know which tab is selected in Qt?

Engine picture Engine · Feb 27, 2013 · Viewed 8k times · Source

I have multiple tabs in an application using Qt and I add them all to a QVBoxLayout object. How to know which one is selected?

Answer

dtech picture dtech · Feb 27, 2013

QTabWidget::currentIndex() will return the index of the active tab.