[PyQt] Re: Connecting two QGraphicsItems

2009-04-09 Thread Wolfgang Rohdewald
On Thursday, 9. April 2009, Mads wrote:
 is it possible to control the position of the item?

just use item.setPos() - this uses a coordinate system
relative to the parent item.

-- 
Wolfgang
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: Connecting two QGraphicsItems

2009-04-09 Thread Mads

Thanks for the replies.

Using setParent works fine for one item, but is it possible to control the 
position of the item? I mean is it possible to place the EllipseItem at a 
certain point on the GraphicsItem, so the EllipseItems don't get placed at the 
same point.

Mads




- Original Message 
From: Wolfgang Rohdewald wolfg...@rohdewald.de
To: pyqt@riverbankcomputing.com
Sent: Tuesday, April 7, 2009 12:34:47 AM
Subject: [PyQt] Re: Connecting two QGraphicsItems

On Montag, 6. April 2009, Marcell Mars wrote:
 On Mon, Apr 6, 2009 at 4:13 PM, Mads kofo...@yahoo.com wrote:
  each item needs to have separate functionality, so you should be able to 
  set different
  attributes on each item. Is the createItemGroup, still the best way forward?
 
 to be more sure i would need more info about your app but as i saw i
 would definitively try createItemGroup and QGraphicsView.. i love
 QGraphicsView 

why not simply make the 3 circles children of the rectangle with
circle.setParentItem(rectangle)? The drawing seems to say that the line of
the rectangle should not be visible below the circles.

-- 
Wolfgang
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt



  
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: Connecting two QGraphicsItems

2009-04-06 Thread Wolfgang Rohdewald
On Montag, 6. April 2009, Marcell Mars wrote:
 On Mon, Apr 6, 2009 at 4:13 PM, Mads kofo...@yahoo.com wrote:
  each item needs to have separate functionality, so you should be able to 
  set different
  attributes on each item. Is the createItemGroup, still the best way forward?
 
 to be more sure i would need more info about your app but as i saw i
 would definitively try createItemGroup and QGraphicsView.. i love
 QGraphicsView 

why not simply make the 3 circles children of the rectangle with
circle.setParentItem(rectangle)? The drawing seems to say that the line of
the rectangle should not be visible below the circles.

-- 
Wolfgang
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt