title: How to get QTreeView cell width inside QItemDelegate sizeHint()?
body: <p>I have a custom QItemDelegate drawing text within a QTreeView.  In paint(), I get the size of the cell from the style.  I then draw the text, with wordwrap, using the current cell's width.</p>
  
  <p>In sizeHint(), I really only want to calculate the height.  The width should just be whatever the current cell width is.  As the user changes the cell width, sizeHint would just calculate the new height of the word-wrapped text and return that.</p>
  
  <p>The problem is that I can't get the cell width inside sizeHint() like I do in paint().  I was using :</p>
  
  <pre><code>style = QApplication.style()
  style.subElementRect(QStyle.SE_ItemViewItemText, option).width()
  </code></pre>
  
  <p>This works in paint(), but returns -1 in sizeHint().  How do I get the current cell width in sizeHint()?</p>