QYolk II - Containers
currentChanged which will be send when you change a tab. Note the documentation:
void currentChanged (int)This signal has a parameter (integer). Until now we used signals with no parameters. In this case the "int" will be ID of the selected tab counting from 0. We connect the signal with a slot the usual way, but we add the parameters in ():
QtCore.QObject.connect(self.ui.pkgTabs,QtCore.SIGNAL("currentChanged(int)"), self.tab_change)tab_id is a argument (our name), which will store the selected widget ID number. First signal parameter is mapped to the first argument of the slot and so on. We can use this signal to change the label text based on the tab which have been selected": I used the self.ui.infoLabel.setText to change the label text. Our QYolk application has more features and in next tutorials we will add even more.