Hi,
I have a TableView which is linked to a model. I have overriden viewportEvent in my table view ( for various reasons ) and have added the following piece of code to it :
Qt Code:
{ if( item.isValid() ) { CDADcb::CSignal* pSignals; pSignals = (CDADcb::CSignal*)theApp->m_dcb.GetSignalList()->at(item.row()); } }To copy to clipboard, switch view to plain text mode
For some reason, I have to click far left of each cell in my table for the model index to be valid, any reason for this or is the above wrong?! Maybe it would be best to emit a signal from my model when item is clicked?
Regards,
Steve
Bookmarks