سؤال

I'm trying to fix strange QtableView behaviour: if one delete row but not commit data, it stays visible in grid. So, I need to retrieve data about deleted rows and know when we discard changes. Info I need is stored in

d->cache[row].op 

of qtableview. Can I somehow get it from there in my subclass?

If no, can I somehow achieve info about pending deletions? The only way I know is to store data when removeRows or revertRow is being executed, but it leads to unnnecessary data duplication and is just unelegant.

هل كانت مفيدة؟

المحلول

I can't. It's by design. Only thing I can is reimplement class from QSqlTableModel, which has open pimpl header.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top