I have a tableview and I'm trying to get onactivated to work but it does not fire and I get:
Object::connect: No such slot MainWindowImpl::rowActived(QModelIndex)
This is my code:
mainwindowimpl.h :
class MainWindowImpl
: public QMainWindow,
public Ui
::MainWindow{
Q_OBJECT
.private slots:
class MainWindowImpl : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
.private slots:
void rowActivated(const QModelIndex &);
To copy to clipboard, switch view to plain text mode
mainwindowimpl.cpp in constructor:
connect(table, SIGNAL(activated(QModelIndex)), this, SLOT(rowActived(QModelIndex)));
To copy to clipboard, switch view to plain text mode
The event
void MainWindowImpl
::rowActivated(const QModelIndex &index
) {
qDebug() << "activate" << index.row();
}
void MainWindowImpl::rowActivated(const QModelIndex &index)
{
qDebug() << "activate" << index.row();
}
To copy to clipboard, switch view to plain text mode
Putting the const and & into the connect() call makes no difference, besides, all other events fire without the const and & in their connects.
No idea what this is. Help appreciated.
Bookmarks