Hi,

I did some searches, difficult to say if I was getting limited results because of search terms though.

Roles are used a lot in Qt (in my case PyQt) and I would like to understand the basic concept in more detail.

I've used them, by example, but not felt I knew for sure what I'd done...

It's likely they are way simpler than I imagine and that may be why I don't completely understand.

Specifically, I don't think I get why/when the role is set by a caller.

Are they really just flags that indicate what, for example, a subclass I write can key on to decide what actions I take?

Pointers to sources I've not read yet happily accepted.

Regards,
Mac