Class: Qt::Variant

Inherits:
Object show all
Defined in:
lib/qtext/extensions.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.invalidObject

return an empty variant



297
298
299
# File 'lib/qtext/extensions.rb', line 297

def self.invalid
  @@invalid ||= Variant.new
end

Instance Method Details

#inspectObject



303
304
305
# File 'lib/qtext/extensions.rb', line 303

def inspect
  "#<Qt::Variant value=#{self.value} typeName=#{self.typeName}>"
end

#old_inspectObject

because the qtruby inspect doesn’t provide the value



302
# File 'lib/qtext/extensions.rb', line 302

alias_method :old_inspect, :inspect

#to_sObject

return the string of the value of this variant



308
309
310
# File 'lib/qtext/extensions.rb', line 308

def to_s
  self.value.to_s
end