[Qt-interest] Blocking signals from / to MVC components.

MARTIN Pierre hickscorp at gmail.com
Wed Sep 21 14:52:18 CEST 2011


Thanks for your time Bo,

> No, it's a fundamental flaw in database handling. The Qt models are 
> based on the ability to know when data is modified, added or removed. 
> That's impossible with an SQL connection, so the Qt SQL model has to do 
> a reset every time it re-fetches the data.
Yeah well... there should at least be an option to tell Qt "My DB is just a storage which can tell you OK i stored your values or NO i didnt. i don't have triggers. i don't have computed columns. Just don't re-read when i write.". It's okay, after all storing selection state and restoring it is just a matter of indexes for most cases... But in my case, i store a huge binary blob on a column, and each time the associated wants to save to the DB backend, the whole UI gets reset. Too bad. 

> If you really want to avoid loosing the selection the right way, and if 
> it's not too expensive, you have to do the reads yourself and do proper 
> beginRemove... etc by checking what changed since the last call. If the 
> database is big, this is not going to work either.
Well. i think i have found the solution. See my next eMail :)

Thank you very much Bo!
Pierre.




More information about the Qt-interest-old mailing list