[SOLVED] change the pen of a QGraphicsItemGroup
-
hello,
i have
QGraphicsItemGroup
used to store a group ofQGraphicsLineItem
,
i want to change the pen ofQGraphicsLineItem
childs but theQGraphicsItemGroup
does not have a such mlethod , so i did a cast fromQGraphicsItemGroup
toQGraphicsLineItem
but the program has stopped !! -
Hi,
the solution could be one of the following:
- Iterate over the list returned by
childItems()
, then check if the item is aQGraphicsLineItem
and set Pen to it - Create a class derived by
QGraphicsLineItem
and implement a method doing the above job
- Iterate over the list returned by