Frank Rueter wrote:

I am building a model for a tree view and have a dictionary that represents all the data in the required hierarchy. I have to be able to filter the view, select things programmatically and show info based on selected items etc.
I am wondering:
With all required data per item available in a dict, is it more efficient to just stuff that into the item's UserRole data or to create custom user roles for each value in the dict that I will be filtering/sorting by or looking up for some other reason?
E.g.:
Will there be a difference in performance with this:

Let's be honest.  This is code that gets execute once. Performance is not a consideration.  Do whatever makes the code simpler.

It's almost never smart to spend time optimizing your initialization.

--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to