Hi,
a newbie question and sorry if it was asked before, I googled it but have not 
find good answer:

I have a tab widget, a few tabs, each tab has a close button. When I clicked 
the 
close button, I want to remove the tab. Question is, how do I know which button 
is clicked in the connection:

public class MyTab extends QTabWidget {
......

private void addTab () {
QPushButton deleteButton = new QPushButton("x");
deleteButton.setMaximumWidth(30);
tabBar.insertTab (1, "New Page");
tabBar.setTabButton(1, ButtonPosition.RightSide, deleteButton);
deleteButton.clicked.connect(this, "deleteTab()");
}
private void deleteTab () {
// how do we know which button is clicked, and which tab I should remove ?
}



}
 thanks,
canal



      
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to