Hi,

I have a treeview connected to a standardItemModel
I want to connect a click on an item do do something with current index.
Qt Code:
  1. treeView = new MyTreeView;
  2. model = new QStandardItemModel(0,12);
  3.  
  4. treeView->setSelectionBehavior(QAbstractItemView::SelectRows);
  5. treeView->setSelectionMode(QAbstractItemView::SingleSelection);
  6. treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
  7. treeView->setModel(model);
  8. treeView->header()->setClickable(true);
  9. connect(treeView, SIGNAL(clicked()), this, SLOT(doGameInfo()));
To copy to clipboard, switch view to plain text mode 

Ive got some rows in the model and I click on a row, nothing happens.
My connect should work should'nt it ?

I dont see why the index could be invalid so thats not the problem ?

Qt Code:
  1. public:
  2. QTreeView *treeView;
  3. private slots:
  4. void doGameInfo();
To copy to clipboard, switch view to plain text mode 

I even tried sub classing QTreeView to re-code :
void clicked ( const QModelIndex & index );

but no luck, any pointers anyone ?
Thanks, Neil