You're probably using a PyQt/Qt version that is too old.
The tabBarClicked
signal was only introduced in Qt5.2, and because of the old-style syntax your're probably using PyQt4 (as in PyQt5 QObject.connect
is gone).
You're not getting an error because in old-style PyQt4, signals are defined implicitly when used, so your code works, but the signal is just never emitted.
You could just use the currentChanged
signal instead.