[Qt-interest] AmIRight: Can't Have Model and View on different Threads?

Arnold Krille arnold at arnoldarts.de
Sun Aug 9 21:17:18 CEST 2009


Hi,

On Friday 07 August 2009 07:36:30 Hostile Fork wrote:
> The short version is that I don't think it's feasible for a Model to
> be modified on a non-GUI thread...regardless of whether the model's
> data has been protected with read/write locks.   If what I'm gathering
> is correct, then Qt should probably have an assert that a model and
> its view have the same thread affinity (it doesn't seem to do that now)

I would find such an assert quite disturbing. Because here it works well to 
have models and views in different threads.
Basically because the models are kind of read-only for the views. The views 
can change values, but they can't add or remove rows/columns. That is done by 
own functions.

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090809/b9a08c91/attachment.bin 


More information about the Qt-interest-old mailing list