'Reimplemented.
Provide sensible vertical size hint based on the view\'s contents.'

def sizeHint(self):

    if (not self.model().rowCount()):
        return QSize(200, 140)
    else:
        scrollHint = self.horizontalScrollBar().sizeHint()
        samplesize = min(10, self.model().rowCount())
        contentheight = max((self.sizeHintForRow(i) for i in range(samplesize)))
        height = (contentheight + scrollHint.height())
        (_, top, _, bottom) = self.getContentsMargins()
        return QSize(200, (((height + top) + bottom) + self.verticalOffset()))
