QMimeSource Class Reference
[QtGui module]
该QMimeSource类是提供一定的MIME类型格式化的数据对象的抽象。More…
通过继承QDropEvent。
Methods
__init__ (self)
__init__ (self, QMimeSource)
QByteArray encodedData (self, str)
str format (self, int i = 0)
bool provides (self, str)
Detailed Description
该QMimeSource类是提供一定的MIME类型格式化的数据对象的抽象。
首选的方法来拖放是使用QDrag在与结合QMimeData。看Drag and Drop了解详情。
Method Documentation
QMimeSource.__init__ (self)
QMimeSource.__init__ (self, QMimeSource)
QByteArray QMimeSource.encodedData (self, str)
[
这种方法是抽象的,应在任何子类中重新实现。
返回指定的MIME这个对象的编码数据format。
str QMimeSource.format (self, int i = 0)
这种方法是抽象的,应在任何子类中重新实现。
返回(i - 支持1)次的MIME格式,或0 。
bool QMimeSource.provides (self, str)
返回True如果对象可以提供的数据格式mimeType否则返回False 。
]($docs-qbytearray.html)
如果从继承QMimeSource,出于一致性考虑,最好是实施更抽象canDecode ()函数,如QTextDrag.canDecode ( )和QImageDrag.canDecode ( ) 。