Hi,
I've got a QTableView with five rows and five columns. In the fifth column of each row I have a QToolButton widget which is connected to the click signal and all go to the same slot. My problem is, I need to know which row is selected when the user has clicked on the button.
connect( button, SIGNAL(clicked()),this,SLOT(SendAMessage()) );
connect( button, SIGNAL(clicked()),this,SLOT(SendAMessage()) );
To copy to clipboard, switch view to plain text mode
void CSignal::SendAMessage()
{
// how can I get which row is selected?
}
void CSignal::SendAMessage()
{
// how can I get which row is selected?
}
To copy to clipboard, switch view to plain text mode
I cannot do this :
connect(ui.tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(GetSelectedRow( QModelIndex )));
To copy to clipboard, switch view to plain text mode
As the button click event is signalled first.
Any ideas?
Thanks,
Steve
Bookmarks