Quote Originally Posted by unix7777 View Post
I'm trying to make the button enabled when some of the tableview row is selected
This one is a bit more complicated than you would expect. The signal you need doesn’t come directly from QTableView, but from the QItemSelectionModel associated with it.

Qt Code:
  1. connect(ui->tableView_clients->selectionModel(),SIGNAL(currentRowChanged(QModelIndex, QModelIndex)),SLOT(enableCheck(QModelIndex, QModelIndex)));
  2.  
  3. ...
  4.  
  5. void enableCheck(const QModelIndex& current, const QModelIndex& previous) {
  6. ui->pushButton_select->setEnabled(current.isValid());
  7. }
To copy to clipboard, switch view to plain text mode 
Since setEnabled requires a bool argument, and the signal you need doesn’t have one, you can’t connect them directly.

Zlatomir’s idea will also work, though he named the wrong method. QAbstractItemView::selectionChanged is a virtual protected slot that is called when the selection changes. If it isn’t already, you would have to make tableView_clients an instance of a subclass of QTableView — remembering the Q_OBJECT macro! — and define a signal which you would connect to QPushButton::setEnabled(bool); then override the selectionChanged method and have it call the base method, then emit that signal.