connect not working with manually created object
QObject::connect isn't working for me if I create the object in C++. It does work if I add it in QT designer though. Doesn't make sense. What am I doing wrong?
CPP:
Code:
tableWidget
->setObjectName
(QString::fromUtf8("tableView"));
tableWidget->setModel(&model);
tableWidget->setAttribute(Qt::WA_DeleteOnClose, true);
Header file:
When I run it it says:
Quote:
QMetaObject::connectSlotsByName: No matching signal for on_tableView_clicked(QModelIndex)
Re: connect not working with manually created object
I see the problem. It works if click a cell in the table, but not the column header, which is what I want. Is there a signal for this?
Re: connect not working with manually created object
Found it, it's sectionClicked on the horizontalHeader()