def adjustHeight(self, column):
        """
        Adjusts the height for this item based on the columna and its text.
        
        :param      column | <int>
        """
        tree = self.treeWidget()
        if not tree:
            return
        
        w = tree.width()
        if tree.verticalScrollBar().isVisible():
            w -= tree.verticalScrollBar().width()
        
        doc = QtGui.QTextDocument()
        doc.setTextWidth(w)
        doc.setHtml(self.text(0))
        height = doc.documentLayout().documentSize().height()
        self.setFixedHeight(height+2)
def adjustHeight ( self , column ) : tree = self . treeWidget ( ) if not tree : return w = tree . width ( ) if tree . verticalScrollBar ( ) . isVisible ( ) : w -= tree . verticalScrollBar ( ) . width ( ) doc = QtGui . QTextDocument ( ) doc . setTextWidth ( w ) doc . setHtml ( self . text ( 0 ) ) height = doc . documentLayout ( ) . documentSize ( ) . height ( ) self . setFixedHeight ( height + 2 )
Adjusts the height for this item based on the columna and its text.
        
        :param      column | <int>