Using QtRuby (via qtbindings) I am trying to add items to a QTreeWidget
. It says that it has a insertTopLevelItems()
method, but it fails to respond to it:
hier = $my.appHierarchy
hier.column_count = 2
hier.header_labels = ['element', 'kind']
p hier.class, hier.methods.grep(/insert/)
#=> Qt::TreeWidget
#=> ["insertAction", "insertActions", "insertTopLevelItem", "insertTopLevelItems"]
hier.insertTopLevelItems ['x','y']
#=> in `method_missing': undefined method `insertTopLevelItems' for #<Qt::TreeWidget:0x007fc6c9153528> (NoMethodError)
How do I add items to this widget?
Ruby 2.0.0p353; Qt 4.8.6; OS X 10.9.5