Because Qt::Variant.new( obj ) is a PITA to type
10 11 12 13 14 15 16
# File 'lib/qtext/extensions.rb', line 10 def to_variant begin Qt::Variant.fromValue( self ) rescue Exception => e raise RuntimeError, "error converting #{self.inspect} to variant", e.backtrace end end