Class: Qt::Variant
Class Method Summary collapse
-
.from_ruby(x) ⇒ Object
Convert any marshallable ruby object into a QVariant.
Instance Method Summary collapse
-
#to_ruby ⇒ Object
Extract the ruby object contained in a QVariant.
Class Method Details
.from_ruby(x) ⇒ Object
Convert any marshallable ruby object into a QVariant.
18 19 20 |
# File 'lib/rui/toolkits/qtbase/qt.rb', line 18 def self.from_ruby(x) new(Marshal.dump(x)) end |
Instance Method Details
#to_ruby ⇒ Object
Extract the ruby object contained in a QVariant.
25 26 27 28 |
# File 'lib/rui/toolkits/qtbase/qt.rb', line 25 def to_ruby str = toString Marshal.load(str) if str end |