Hi,

thanks for the reply.
First off, see if having an actual pointer to your model makes a difference instead of allocating memory for it in the setModel method; i.e.:
QAbstractTableModelsubclass* myModel; //defined in header file as member of possibly QMainWindow
myModel = new QQAbstractTableModelsubclass(...);
pTable->setModel(myModel);
I am not sure what do you mean.
The call:
Qt Code:
  1. pTable->setModel((QAbstractTableModel *)&m_logFile->dataModel());
To copy to clipboard, switch view to plain text mode 
is not allocating anything.
m_logFile->dataModel() returns a reference to a model which is allocated and lives in m_logFile.
At the time when I am calling pTable->setModel() the model is well allocated and filled with data, so I am not sure what you might have meant there, can you restate maybe?

I'm not exactly sure what is happening when you make the call to setModel with your parameters (not seeing the whole code), but it looks suspicious.
Which setModel() do you mean? my model subclass setModel() or the pTable->setModel()?
And what exactly you find suspicious - so I can check it.

Also, another avenue is seeing your data function, which I don't see listed in your header. This is where the table view actually gets the data for your model.
True.
I forgot to add it here, I will later when I am home again. (don't have the code here).
However, as I said, my data() function is not being called by the QTableView... all though I checked to make sure my virtual implementations signatures are correct, I will have a look again.

Thanks, and if you have more pointers, please share.