qt_developer
18th May 2012, 18:48
Hi all,
I need monitoring the changes in the data content of a cell of QTableView (http://qt-project.org/doc/qt-4.8/qtableview.html).
I have a QTableView widget into QMainWindow (http://qt-project.org/doc/qt-4.8/qmainwindow.html).
I have tried with the QAbstractItemView signals (http://qt-project.org/doc/qt-4.8/qabstractitemview.html#signals), the slots are called in my QMainWindow class, but neither of them accomplish the target that I need.
I have tried with the currentChanged( const QModelIndex & current, const QModelIndex & previous ) signal of QItemSelectionModel (http://qt-project.org/doc/qt-4.8/qitemselectionmodel.html#signals), as above the slot is called, but itsn't accomplish the target that I need too.
I make the connects like this:
connect(ui->myTableView->selectionModel(), SIGNAL(currentChanged ( QModelIndex const&, QModelIndex const& )), this, SLOT(onCurrentChanged(QModelIndex con7st&, QModelIndex const&)));
connect(ui->myTableView, SIGNAL(pressed(const QModelIndex &)), this, SLOT(onPressed(const QModelIndex &)));
There are any signal / slot / method or similar that I could use to accomplish my target?
Best regards.
I need monitoring the changes in the data content of a cell of QTableView (http://qt-project.org/doc/qt-4.8/qtableview.html).
I have a QTableView widget into QMainWindow (http://qt-project.org/doc/qt-4.8/qmainwindow.html).
I have tried with the QAbstractItemView signals (http://qt-project.org/doc/qt-4.8/qabstractitemview.html#signals), the slots are called in my QMainWindow class, but neither of them accomplish the target that I need.
I have tried with the currentChanged( const QModelIndex & current, const QModelIndex & previous ) signal of QItemSelectionModel (http://qt-project.org/doc/qt-4.8/qitemselectionmodel.html#signals), as above the slot is called, but itsn't accomplish the target that I need too.
I make the connects like this:
connect(ui->myTableView->selectionModel(), SIGNAL(currentChanged ( QModelIndex const&, QModelIndex const& )), this, SLOT(onCurrentChanged(QModelIndex con7st&, QModelIndex const&)));
connect(ui->myTableView, SIGNAL(pressed(const QModelIndex &)), this, SLOT(onPressed(const QModelIndex &)));
There are any signal / slot / method or similar that I could use to accomplish my target?
Best regards.