def preferredSize(self, rowLimit, colLimit):
    if app.config.strict_debug:
        assert self.parent
        assert (rowLimit >= 0)
        assert (colLimit >= 0)
    preferredWidth = (self.preferredWidth if (self.preferredWidth is not None) else len(self.label))
    return (min(rowLimit, 1), min(colLimit, preferredWidth))
def preferredSize(self, rowLimit, colLimit):
    if app.config.strict_debug:
        assert self.parent
        assert (rowLimit >= 0)
        assert (colLimit >= 0)
    preferredWidth = (self.preferredWidth if (self.preferredWidth is not None) else len(self.label))
    return (min(rowLimit, 1), min(colLimit, preferredWidth))