QMimeSource Class

The QMimeSource class is an abstraction of objects that provided formatted data of a certain MIME type. 更多...

頭: #include <QMimeSource>
繼承者: Q3DragObject and QDropEvent

該類已過時。 提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

公共函數

virtual ~QMimeSource ()
virtual QByteArray encodedData (const char * format ) const = 0
virtual const char * format (int i = 0) const = 0
virtual bool 提供 (const char * mimeType ) const

詳細描述

The QMimeSource class is an abstraction of objects that provided formatted data of a certain MIME type.

The preferred approach to drag and drop is to use QDrag in conjunction with QMimeData 。見 拖放 瞭解細節。

另請參閱 QMimeData and QDrag .

成員函數文檔編製

[虛擬] QMimeSource:: ~QMimeSource ()

Destroys the MIME source.

[pure virtual] QByteArray QMimeSource:: encodedData (const char * format ) const

Returns the encoded data of this object in the specified MIME format .

[pure virtual] const char * QMimeSource:: format ( int i = 0) const

Returns the ( i - 1)-th supported MIME format, or 0.

[虛擬] bool QMimeSource:: 提供 (const char * mimeType ) const

Returns true if the object can provide the data in format mimeType ;否則返迴 false。

If you inherit from QMimeSource , for consistency reasons it is better to implement the more abstract canDecode() functions such as QTextDrag::canDecode() and QImageDrag::canDecode().