All pastes #133817 Raw Edit

tuxplorer

public ruby v1 · immutable
#133817 ·published 2006-08-16 03:32 UTC
rendered paste body
class Question_options_widget < Qt::Widget        def initialize(name,label,options)                super(nil)                @hbox = Qt::HBox.new(self)                @lbl = Qt::Label.new(@hbox,label)                @lbl.setText(label)                @bgrp = Qt::ButtonGroup.new(1,Qt::GroupBox::Horizontal,"Button Group 1 (exclusive)", @hbox)                @box = Qt::VBoxLayout.new(@hbox)                @box.addWidget(@bgrp)                @bgrp.setExclusive(TRUE)#insert radiobuttons                options.each do |option_item|                        Qt::RadioButton.new(option_item.get_response,@bgrp)                end                connect(@bgrp,SIGNAL('clicked (int)'),Packagingvars,SLOT('setvar(@label,int)')        endend