Hi,

I have a problem and I don´t know the reason. I have a QTableView(ui.tvLotes) with a personal model (that inherit from QAbstractTableModel) and an actionMenu with this triggered event:

void mainScreen:: on_actionEliminar_triggered()
{
QItemSelectionModel *select = ui.tvLotes->selectionModel();
if(select!=NULL)
{
if(select->hasSelection()) //check if has selection
{
QModelIndexList rows=select->selectedRows(); }
}
}

When I use QModelIndexList rows=select->selectedRows(); my program crash with "msvcr100d.dll!_free_base(void * pBlock) LÃ*nea 50 + 0x13Bytes C". I use Visual Studio 2010 in mode debug

I have tried others options like:
connect(ui.tvLotes->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelect ion)),this, SLOT(itemSelectionChanged(QItemSelection,QItemSele ction)));

void mainScreen::itemSelectionChanged(QItemSelection col,QItemSelection row)
{
QModelIndexList indexes=col.indexes();
}

And I have the same crash


For example for this code I havent any problem:
connect(ui.tvLotes->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(currentChanged(QModelIndex,QModelIndex)));

void VentanaPrincipal::currentChanged(QModelIndex old,QModelIndex nuevo)
{
QMessageBox::information (this, "Msg", "OLD -> Row.."+QString::number(old.row())+",col:"+QString: :number(old.column())+" NEW -> Row.."+QString::number(nuevo.row())+",col:"+QStrin g::number(nuevo.column()), QMessageBox::Close);
}