// connections written in constructor
connect(ui->treeWidget,SIGNAL(itemClicked(QTreeWidgetItem *,int)),this,SLOT(maybeShowpvc(QTreeWidgetItem*))) ;
connect(ui->treeWidget,SIGNAL(itemClicked(QTreeWidgetItem *,int)),this,SLOT(maybeShowplc(QTreeWidgetItem*))) ;
connect(ui->treeWidget,SIGNAL(itemClicked(QTreeWidgetItem *,int)),this,SLOT(maybeShowioc(QTreeWidgetItem*))) ;
connect(ui->treeWidget,SIGNAL(itemClicked(QTreeWidgetItem ,int)),this,SLOT(maybeShowldr(QTreeWidgetItem*)));
// slot methods
void X::maybeShowpvc(QTreeWidgetItem *plc)
{
if(item){
plc->show();
......
// code
}
void X::maybeShowplc(QTreeWidgetItem *pvc)
{
//connection code
pvc->show();
.............
}
void X::maybeShowpvc(QTreeWidgetItem *ioc)
{
//connection code
.....
}
void X::maybeShowldr(QTreeWidgetItem *ldr)
{
//connection code
.....
}
when iam using above code all the connections and slots are working at a time...........is there any possibility to get the connections to particular item (plc,pvc,ioc,ldr) ...
Bookmarks