plz go through the below code and before posted code........
{
if(item == lnx)
{
ECLogic_Lnx=new eclogic_lnx(main_tab_widget);
ECLogic_Lnx
->setWindowTitle
(QString("ECLOGIC-LNX"));
ECLogic_Lnx->show();
}
else
if(item == plc)
tab_3
=new QTabBar(main_tab_widget
);
PLCconfig=new plcconfiguration(tab_3);
PLCconfig
->setWindowTitle
(QString("PLC"));
main_tab_widget
->insertTab
(0,tab_3,
QString("PLC"));
tab_3->setCurrentIndex(main_tab_widget->indexOf(tab_3));
PLCconfig->show();
}
void xxx::showItem(QTreeWidgetItem* item)
{
if(item == lnx)
{
ECLogic_Lnx=new eclogic_lnx(main_tab_widget);
ECLogic_Lnx->setWindowTitle(QString("ECLOGIC-LNX"));
ECLogic_Lnx->show();
}
else
if(item == plc)
tab_3=new QTabBar(main_tab_widget);
PLCconfig=new plcconfiguration(tab_3);
PLCconfig->setWindowTitle(QString("PLC"));
main_tab_widget->insertTab(0,tab_3,QString("PLC"));
tab_3->setCurrentIndex(main_tab_widget->indexOf(tab_3));
PLCconfig->show();
}
To copy to clipboard, switch view to plain text mode
while iam using if(........) condition the other windows(plc,pvc,....)has to open when i click the treewidgetitems like PLC,ECLOGIC-LNX........but the condition is not working correctly
Bookmarks