[Kde-bindings] unable to create Qt::Variant from array of Qt::Variants in qtruby4

Richard Dale rdale at foton.es
Fri Jun 27 12:03:13 UTC 2008


On Friday 27 June 2008 09:16:15 Stefano Crocco wrote:
> I'm trying to create a Qt::Variant from an array of Qt::Variant s using the
> latest svn revision of qtruby4, but this makes my application crash. This
> is a simple script which causes this behavior:
>
> require 'Qt4'
> list = [1,2,3].map{|i| Qt::Variant.new i}
> Qt::Variant.new list

It works fine for me:

list = [1,2,3].map{|i| Qt::Variant.new i}
v = Qt::Variant.new list
p v
p v.value

gives:

#<Qt::Variant:0xb7cadf5c typeName=QVariantList>
[#<Qt::Variant:0xb7ca71e8 typeName=int>, #<Qt::Variant:0xb7ca71ac 
typeName=int>, #<Qt::Variant:0xb7ca7080 typeName=int>]

So I'm not sure what is different about your build.

-- Richard




More information about the Kde-bindings mailing list