So access the rest of the lines and mark them to be highlighted. You surely have pointers to those objects somewhere so that shouldn't be a problem.
So access the rest of the lines and mark them to be highlighted. You surely have pointers to those objects somewhere so that shouldn't be a problem.
I solved the problem. Thanks for your help.
But, I've come with a new one. I create SearchAreaItem as an ItemGroup and put the LineItems into it. What I want to achieve is to make the SearchAreaItem act as the only item when I perform movement operation. But it confused about the shape() function. In my LineItem class I implement the shape() for more precise mouse operations. In addition to that reimplementation of shape(), I also reimplement it in SearchAreaItem. So what's the deal here? Only one proper shape will be sufficient? Is there any extra work needed for grouping items out of adding the group to the scene and adding the items to that group?
Thanks in advance!
No, there is nothing more required apart from creating the group. Unfortunately your description is not clear enough to understand what your problem is. Providing a piece of code would be helpful.
I would wish to send a bit but I'm not allowed:/.
Anyway, I'm trying my best to explain it once.
I have many LineItems which are created and form an ellipse inside another item group called SearchAreaItem. Futhermore, each LineItem has a shape() function for more efficiency(I assume you've seen the reason already). Now, what I really want to do is treat this SearchAreaItem as the composite item. Don't want to deal with LineItem's created inside it when the mouse hover over click operations take place. That's why I designed the SeachAreaItem as an item group.
Now I want to ask, what the main usage of setHandlesChildEvents method?
and, although I didn't implement the itemChange() method, I'm now able to drag-drop my SearchAreaItem( the ellipse) by only setting movable flag. Isn't it a bit odd?
itemGroup->setHandlesChildEvents (false ); will make all the members in the group independent ...Now I want to ask, what the main usage of setHandlesChildEvents method?
without setting this .. the focus will be on whole .. mouse click is common everywhere to the group members ..
"Behind every great fortune lies a crime" - Balzac
zgulser (13th August 2009)
... what about the shape() function?
Bookmarks