New to qt, using qdevelop.
For a few days now I'm trying get an event working when a row is clicked in a tableview.
I think I have all the syntax right but the event is still not firing and I'm getting out of options.
In Mainwindow.ui, a signal / slot pair exists that connects the table pressed(QModelIndex) to the MainWindow.
<sender>table</sender>
<signal>pressed(QModelIndex)</signal>
<receiver>MainWindow</receiver>
<slot></slot>
Then I have this code, in mainwindowimpl.h
private slots:
void rowClicked(const QModelIndex &);
and in mainwindowimp.cpp:
in constructor:
connect(table, SIGNAL(pressed(const QModelIndex &)), this, SLOT(rowClicked(const QModelindex &)));
member function:
void MainWindowImpl::rowClicked(const QModelIndex &index)
{
int row = index.row();
QString name = model->record(row).value("name").toString();
setWindowTitle(name);
}
That event does not get called, why not? Voodoo?
Help is appreciated.
Bookmarks