Class: Qt::ListWidget::Item

Inherits:
Qt::ListWidgetItem
  • Object
show all
Defined in:
lib/rui/toolkits/qtbase/qt.rb

Instance Method Summary collapse

Constructor Details

#initialize(text, list, data) ⇒ Item

Returns a new instance of Item.



424
425
426
427
# File 'lib/rui/toolkits/qtbase/qt.rb', line 424

def initialize(text, list, data)
  super(text, list)
  set_data(FROM_A_DATA_ROLE, Qt::Variant.from_ruby(data))
end

Instance Method Details

#getObject



429
430
431
# File 'lib/rui/toolkits/qtbase/qt.rb', line 429

def get
  data(FROM_A_DATA_ROLE).to_ruby
end