code: def storeValue(self, xelem, value):
          
          typ = type(value)
          
          if typ == QtGui.QColor:
              xelem.set('type', 'color')
              xelem.text = nativestring(value.name())
          
          elif typ == QtCore.QPoint:
              xelem.set('type', 'point')
              xelem.text = '{0},{1}'.format(value.x(), value.y())
          
          elif typ == QtCore.QPointF:
              xelem.set('type', 'pointf')
              xelem.text = '{0},{1}'.format(value.x(), value.y())
          
          elif typ == QtCore.QRect:
              xelem.set('type', 'rect')
              xelem.text = '{0},{1},{2},{3}'.format(value.x(),
                                                    value.y(),
                                                    value.width(),
                                                    value.height())
          
          elif typ == QtCore.QRectF:
              xelem.set('type', 'rectf')
              xelem.text = '{0},{1},{2},{3}'.format(value.x(),
                                                    value.y(),
                                                    value.width(),
                                                    value.height())
          
          elif typ == QtCore.QByteArray:
              xelem.set('type', 'bytea')
              xelem.text = cPickle.dumps(nativestring(value))
          
          elif typ == ElementTree.Element:
              xelem.set('type', 'xml')
              xelem.append(value)
          
          elif typ in (list, tuple, dict):
              xelem.set('type', 'pickle')
              xelem.text = cPickle.dumps(value)
          
          else:
              if not typ in (str, unicode):
                  value_text = nativestring(value)
              else:
                  value_text = value
              
              xelem.set('type', typ.__name__)
              xelem.text = value_text
docs: Stores the value for the inptued instance to the given xml element.
          
          :param      xelem | <xml.etree.Element>
                      value | <variant>