def _checkbox(cls, text, tooltip, checked):
 widget = cls()
 if text:
  widget.setText(text)
 if tooltip:
  widget.setToolTip(tooltip)
 if (checked is not None):
  widget.setChecked(checked)
 return widget

def _checkbox ( cls , text , tooltip , checked ) : widget = cls ( ) if text : widget . setText ( text ) if tooltip : widget . setToolTip ( tooltip ) if ( checked is not None ) : widget . setChecked ( checked ) return widget
create a widget and apply properties .