[Qt-jambi-interest] QAbstractItemModel: modelAboutToBeReset and modelReset signal?

Gunnar Sletta gunnar at trolltech.com
Wed Feb 11 07:54:48 CET 2009


Mathias wrote:
> Gentlemen,
> 
> I'm working a lot with the QTreeView widgets and custom QAbstractItemModels.
> Now I'm wondering why you have made the decision to not expose the 
> modelAboutToBeReset and modelReset signals to Java.
> The layoutAboutToBeChanged and layoutChanged signals are available, but 
> for some reason to two reset signals are missing.
> 
> Since I need to intercept the reset events I now have to create my own 
> signals and override reset() to fire them myself, which is kind of ugly, 
> since under the hood the same thing already exists... maybe you just 
> missed exposing them?

The reason for these being missing previously are that they are actually 
declared private in C++ and actually accessible only to the C++ connect 
statement through "a rather nasty hack" ;)

In the 4.5 release, we've added a set of PrivateSignals which can be 
connected to, but not emitted(). This makes it possible for us to 
support this kind of API so 4.5 will have these signals available.

best regards,
Gunnar



More information about the Qt-jambi-interest mailing list