title: pyqt. How do you know the type of object in QGraphicsScene?
body: <p>i use pyqt4.8 + python2.7</p>
  
  <p>in <code>QGraphicsScene</code> i add different objects like <code>QGraphicsEllipseItem</code> and <code>QGraphicsProxyWidget</code> (with <code>QPushButton</code>). To work with different types of objects have to call different functions.</p>
  
  <p>such as changing the size of the object</p>
  
  <p>for <code>QGraphicsEllipseItem</code>:</p>
  
  <pre><code>item.setRect(size)
  </code></pre>
  
  <p>for <code>QPushButton</code>:</p>
  
  <pre><code>item.widget().setRect(size)
  </code></pre>
  
  <p><em>ps. <code>setRect()</code> for <code>QPushButton</code> - is my custom function</em></p>
  
  <p>I select objects in the scene and want to change their size. But for different objects need to call different functions and need to get like that type of object to cause then the desired function.</p>
  
  <p>I got selected objects.</p>
  
  <pre><code>selItems = self.scene.selectedItems()
  for item in selItems:
      ...
  </code></pre>
  
  <p>how to further learn what type of object to trigger the desired function?</p>