var box = new QHBox( 'tree_view' ); box.margin = 6; var led = new KLed( box ); var btn = new QCheckBox(box); btn.text = 'Light' btn.connect( 'toggled(bool)', led, 'toggle()' ); box.show();