I'm working with QGraphicsView/Scene for the first time. This is in PyQt, but except for the fact that Python is different with multiple inheritance, I think this is a generic Qt question.
I started out by creating a couple of QGraphicsItem overloads as building blocks. Once I had those working the way I wanted, I wanted to try to combine them and was unpleasantly surprised to find that I couldn't use the in QGraphicsLayouts. This is due to the fact the QGraphicsLayouts take items that inherit from QGraphicsLayoutItem, and QGraphicsItems are inherited by QGraphicsLayoutItems, which are in turn inherited by QGraphicsWidgets.
There is a graphicsItem property of QGraphicsItem/QGraphicsWidget, but looking at the code, I don't think I can assign my Item's to this property and have them work properly. I did find this example, but strangely enough it has examples that inherit from both classes. Pretty confusing to me.
So I'm trying to find the easiest way to get my Items working in Layouts. Is there an easier way to do this than rewriting and inheriting from one of this two classes?
Secondary question, is there a rule of thumb for when you should inherit from QGraphicsWidget vs when you should inherit from QGraphicsLayoutItem?
Extra credit for explaining when sizeHint vs. boundingRect are used.
Appreciate the help, Brett