How can i find which item is clicked ??
you can do this by checking the text of the item clicked :
{
if(index.data().toString()=="TableRecipts")
createTableReciptsModel();
}
void MainWindow::treeViewClicked(QModelIndex index)
{
if(index.data().toString()=="TableRecipts")
createTableReciptsModel();
}
To copy to clipboard, switch view to plain text mode
or, if you have more than row with the same text , you can check both the text and the index :
else if(customersTreeValue=="totalBounty"&&index.row()==0)
{
totalBountyClicked();
}
else if(customersTreeValue=="totalBounty"&&index.row()==0)
{
totalBountyClicked();
}
To copy to clipboard, switch view to plain text mode
i hope i was helpful .
Bookmarks