I am using PyQt5 to make the user interface. Now I have set up a tab widget, and I want to trigger the event at such a time when a specific tab is selected. In other words, for example, I have tab A and tab B, and I want to execute the function every time user is switching from tab A to tab B.
When a new tab is selected currentChanged(int index)
signal of the QTabWidget
is emitted. Just connect that signal to some slot and check the index of the newly selected tab which is passed as argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With