From kde-bindings Sat Jul 07 11:11:54 2012 From: Florian Staudacher Date: Sat, 07 Jul 2012 11:11:54 +0000 To: kde-bindings Subject: [Kde-bindings] qtruby QAbstractListModel::setRoleNames -> ArgumentError Message-Id: <4FF8197A.70201 () yahoo ! de> X-MARC-Message: https://marc.info/?l=kde-bindings&m=134165976025397 Hi again! Sorry to bombard you with my messages, but I ran into another problem. It seems like the type used by ItemModels to handle role name mappings for QML cannot be used from ruby. I am getting this error when trying to call setRoleNames (or set_role_names) on my subclass of QAbstractListModel: classname == QAbstractListModel :: method == setRoleNames -> methodIds == [#] candidate list: void QAbstractItemModel::setRoleNames(const QHash&) (smoke: 0 index: 282) matching => smoke: 0 index: 282 const QHash& (U) match => 282 score: 1 Resolved to id: 282 setCurrentMethod(smokeList index: 0, meth index: 282) test.rb:282:in `method_missing': Cannot handle 'const QHash&' as argument of QAbstractItemModel::setRoleNames (ArgumentError) I have tried setting it to: { 1 => "something" } # or { 1 => Qt::ByteArray.new("something") } # or [ 1 => "something" ] # or [ 1 => Qt::ByteArray.new("something") ] but they all produced the same message. Also, reading the roleNames property of that object results in a similar message: ArgumentError: Cannot handle 'const QHash&' as return-type of QAbstractItemModel::roleNames This can be reproduced always with the following snippet: require 'Qt4' model = Qt::AbstractListModel.new model.role_names Thank you for your help! - Florian P.S: would you prefer those kind of messages here on the mailing list or on the kde bugtracker? _______________________________________________ Kde-bindings mailing list Kde-bindings@kde.org https://mail.kde.org/mailman/listinfo/kde-bindings