Hi Everybody.
Need you peoples help to solve a problem.

My code is like below.

Qt Code:
  1. connect(ui->treeWidget, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
  2. this, SLOT(treeItemClickAction(QTreeWidgetItem*, int)));
To copy to clipboard, switch view to plain text mode 

If i click the mouse in treewidget Item treeItemClickAction(QTreeWidgetItem*, int) is getting called. But i need to call this methode if i click only left mouse button in the treewidget. and if i pressed the right button in a treewidget Item a new action need to be opened. Or inside treeItemClickAction, can I track which mouse button is pressed.?

Thank u all.