My project works fine, and now (and i dont know why) have and error. Im trying to read from a tablewidget and write to a file, and I use this functions:

Qt Code:
  1. QString Sheet::getcellvalue(int row,int col)
  2. {
  3. QTableWidgetItem *newItem = tabla->item(row,col);
  4. QString qv = newItem->text();
  5. return qv;
  6. }
To copy to clipboard, switch view to plain text mode 

where "tabla" is a QTableWidget. Now the compiler says:

Excepción no controlada en 0x6524c1ac en QTDAM.exe: 0xC0000005: Infracción de acceso al leer la ubicación 0x00000000.

I was using .toStdString to convert QStrings to strings, and now .toLatin1. And when i change this, this code give me this error ????????.

Why? and How to programm well.

Please help.
Thanks