
Originally Posted by
jthomps
No problem, we've all been there...

That is just one reason why I prefer the new connect syntax that avoids the use of SIGNAL/SLOT macros.
Indeed, but that became available in Qt5, according to breakthecode's profile they are using Qt4.
It is possible to make the connect a bit less verbose though, i.e. removing the const references
connect(ui->tableView->selectionModel(),
this,
connect(ui->tableView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
SLOT(on_tableViewSelection(QItemSelection, QItemSelection)));
To copy to clipboard, switch view to plain text mode
Also, if your slot doesn't need the arguments, you can use a slot with fewer arguments than the signal has., e.g.
connect(ui->tableView->selectionModel(),
this,
SLOT(on_tableViewSelection()));
connect(ui->tableView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
SLOT(on_tableViewSelection()));
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks