All pastes #132466 Raw Edit

tuxplorer

public text v1 · immutable
#132466 ·published 2006-08-15 10:07 UTC
rendered paste body
require 'Qt'
require 'Classes.rb'
require 'lib.rb'

class Question_options_widget < Qt::HBox
        def initialize(name,label,options)
                super
               @lbl = Qt::Label.new(self,label)
               @lbl.setText(label)
               @bgrp = QButtonGroup.new(1,QGroupBox::Horizontal,"Button Group 1 (exclusive)",self)
               @box = QVBoxLayout.new(self,11,6)
               @box.addWidget(@bgrp)
               @bgrp.setExclusive(TRUE)
#insert radiobuttons
               options.each do |option_item|
                       QRadioButton.new(option_item.response,bgrp)
               end
        end
end
class Question_text_widget < Qt::HBox
        def initialize(name,label)
                super
                @lbl = Qt::Label.new(self,label)
                @lbl.setText(label)
                @txt = Qt::LineEdit.new(self,name)
        end
end