class RUI::GuiBuilder::Widget

A generic widget.

To use this tag, the factory descriptor property must be set to the Factory to use to create the widget. The {Factory} class can be useful when the widget to create needs special initialization. Note that the given factory will be invoked passing only the parent widget as a parameter, so any extra parameters must be preset by the factory itself.

Public Instance Methods

create_element(window, parent, desc) click to toggle source
# File lib/rui/toolkits/qtbase/gui_builder.rb, line 265
def create_element(window, parent, desc)
  widget = factory(desc).new(window)
  setup_widget(widget, window, parent, desc)
  widget
end
factory(desc) click to toggle source
# File lib/rui/toolkits/qtbase/gui_builder.rb, line 271
def factory(desc)
  desc.opts[:factory]
end