def RenderWidget(self):
        """Returns a QWidget subclass instance. Exact class depends on self.type"""
        t = self.type
        if t == int:
            ret = QSpinBox()
            ret.setMaximum(999999999)
            ret.setValue(self.value)
        elif t == float:
            ret = QLineEdit()
            ret.setText(str(self.value))
        elif t == bool:
            ret = QCheckBox()
            ret.setChecked(self.value)
        else:  # str, list left
            ret = QLineEdit()
            ret.setText(str(self.value))

        if self.toolTip is not None:
            ret.setToolTip(self.toolTip)

        self.widget = ret
        return ret
Returns a QWidget subclass instance. Exact class depends on self.type