Hi,
I have a QAbstractTableModel with one QSortFilterProxyModel connected to a QTableView.
Now I want that if a user clicks on one row (any horizontal item) of the QTableView another QTableView is showing additional data of the QAbstractTableModel. Both QTableViews are editable and should correctly set the model data.
So far I connected
connect(fileTableView, SIGNAL(clicked(QModelIndex)), this, SLOT(onFileClicked(QModelIndex)));
To copy to clipboard, switch view to plain text mode
In onFileClicked I save the clicked row to be used later.
void MyClass::onFileClicked(const QModelIndex& index)
{
myModel->setClickedRow(index);
}
void MyClass::onFileClicked(const QModelIndex& index)
{
myModel->setClickedRow(index);
}
To copy to clipboard, switch view to plain text mode
I then used another QSortFilterProxyModel for the 2nd table and tried to reimplement mapFromSource(), but with no success.
Has anybody an idea how to design the desired behaviour?
Thanks Darth
Bookmarks