1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QMimeData Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMimeData Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QMimeData class provides a container for data that records information about its MIME type. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmimedata.html#QMimeData">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmimedata.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qmimedata.html#colorData">colorData</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qmimedata.html#data">data</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QStringList <b><a href="qmimedata.html#formats">formats</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasColor">hasColor</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasFormat">hasFormat</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasHtml">hasHtml</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasImage">hasImage</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasText">hasText</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmimedata.html#hasUrls">hasUrls</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmimedata.html#html">html</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qmimedata.html#imageData">imageData</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmimedata.html#removeFormat">removeFormat</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QVariant <b><a href="qmimedata.html#retrieveData">retrieveData</a></b> (<i>self</i>, QString, QVariant.Type)</li><li><div class="fn" /><b><a href="qmimedata.html#setColorData">setColorData</a></b> (<i>self</i>, QVariant)</li><li><div class="fn" /><b><a href="qmimedata.html#setData">setData</a></b> (<i>self</i>, QString, QByteArray)</li><li><div class="fn" /><b><a href="qmimedata.html#setHtml">setHtml</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmimedata.html#setImageData">setImageData</a></b> (<i>self</i>, QVariant)</li><li><div class="fn" /><b><a href="qmimedata.html#setText">setText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmimedata.html#setUrls">setUrls</a></b> (<i>self</i>, list-of-QUrl)</li><li><div class="fn" />QString <b><a href="qmimedata.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QUrl <b><a href="qmimedata.html#urls">urls</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMimeData class provides a container for data that records information about its MIME type.</p>
<p>QMimeData is used to describe information that can be stored in the <a href="qclipboard.html">clipboard</a>, and transferred via the <a href="dnd.html">drag and drop</a> mechanism. QMimeData objects associate the data that they hold with the corresponding MIME types to ensure that information can be safely transferred between applications, and copied around within the same application.</p>
<p>QMimeData objects are usually created using <tt>new</tt> and supplied to <a href="qdrag.html">QDrag</a> or <a href="qclipboard.html">QClipboard</a> objects. This is to enable Qt to manage the memory that they use.</p>
<p>A single QMimeData object can store the same data using several different formats at the same time. The <a href="qmimedata.html#formats">formats</a>() function returns a list of the available formats in order of preference. The <a href="qmimedata.html#data">data</a>() function returns the raw data associated with a MIME type, and <a href="qmimedata.html#setData">setData</a>() allows you to set the data for a MIME type.</p>
<p>For the most common MIME types, QMimeData provides convenience functions to access the data:</p>
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
<thead><tr class="qt-style" valign="top"><th>Tester</th><th>Getter</th><th>Setter</th><th>MIME Types</th></tr></thead>
<tr class="odd" valign="top"><td><a href="qmimedata.html#hasText">hasText</a>()</td><td><a href="qmimedata.html#text">text</a>()</td><td><a href="qmimedata.html#setText">setText</a>()</td><td><tt>text/plain</tt></td></tr>
<tr class="even" valign="top"><td><a href="qmimedata.html#hasHtml">hasHtml</a>()</td><td><a href="qmimedata.html#html">html</a>()</td><td><a href="qmimedata.html#setHtml">setHtml</a>()</td><td><tt>text/html</tt></td></tr>
<tr class="odd" valign="top"><td><a href="qmimedata.html#hasUrls">hasUrls</a>()</td><td><a href="qmimedata.html#urls">urls</a>()</td><td><a href="qmimedata.html#setUrls">setUrls</a>()</td><td><tt>text/uri-list</tt></td></tr>
<tr class="even" valign="top"><td><a href="qmimedata.html#hasImage">hasImage</a>()</td><td><a href="qmimedata.html#imageData">imageData</a>()</td><td><a href="qmimedata.html#setImageData">setImageData</a>()</td><td><tt>image/</tt> *</td></tr>
<tr class="odd" valign="top"><td><a href="qmimedata.html#hasColor">hasColor</a>()</td><td><a href="qmimedata.html#colorData">colorData</a>()</td><td><a href="qmimedata.html#setColorData">setColorData</a>()</td><td><tt>application/x-color</tt></td></tr>
</table></p>
<p>For example, if your write a widget that accepts URL drags, you would end up writing code like this:</p>
<pre> void MyWidget.dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasUrls())
event->acceptProposedAction();
}
void MyWidget.dropEvent(QDropEvent *event)
{
if (event->mimeData()->hasUrls()) {
foreach (QUrl url, event->mimeData()->urls()) {
...
}
}
}</pre>
<p>There are three approaches for storing custom data in a QMimeData object:</p>
<ol type="1">
<li>Custom data can be stored directly in a QMimeData object as a <a href="qbytearray.html">QByteArray</a> using <a href="qmimedata.html#setData">setData</a>(). For example:<pre> QByteArray csvData = ...;
QMimeData *mimeData = new QMimeData;
mimeData->setData("text/csv", csvData);</pre>
</li>
<li>We can subclass QMimeData and reimplement <a href="qmimedata.html#hasFormat">hasFormat</a>(), <a href="qmimedata.html#formats">formats</a>(), and <a href="qmimedata.html#retrieveData">retrieveData</a>().</li>
<li>If the drag and drop operation occurs withing a single application, we can subclass QMimeData and add extra data in it, and use a <a href="qobject.html#qobject_cast">qobject_cast</a>() in the receiver's drop event handler. For example:<pre> void MyWidget.dropEvent(QDropEvent *event)
{
const MyMimeData *myData =
qobject_cast<const MyMimeData *>(event->mimeData());
if (myData) {
<span class="comment">// access myData's data directly (not through QMimeData's API)</span>
}
}</pre>
</li>
</ol>
<a name="platform-specific-mime-types" />
<h3>Platform-Specific MIME Types</h3>
<p>On Windows, <a href="qmimedata.html#formats">formats</a>() will also return custom formats available in the MIME data, using the <tt>x-qt-windows-mime</tt> subtype to indicate that they represent data in non-standard formats. The formats will take the following form:</p>
<pre> application/x-qt-windows-mime;value="<custom type>"</pre>
<p>The following are examples of custom MIME types:</p>
<pre> application/x-qt-windows-mime;value="FileGroupDescriptor"
application/x-qt-windows-mime;value="FileContents"</pre>
<p>The <tt>value</tt> declaration of each format describes the way in which the data is encoded.</p>
<p>On Windows, the MIME format does not always map directly to the clipboard formats. Qt provides <a href="qwindowsmime.html">QWindowsMime</a> to map clipboard formats to open-standard MIME formats. Similarly, the <a href="qmacpasteboardmime.html">QMacPasteboardMime</a> maps MIME to Mac flavors.</p>
<p>See also <a href="qclipboard.html">QClipboard</a>, <a href="qdragenterevent.html">QDragEnterEvent</a>, <a href="qdragmoveevent.html">QDragMoveEvent</a>, <a href="qdropevent.html">QDropEvent</a>, <a href="qdrag.html">QDrag</a>, <a href="qwindowsmime.html">QWindowsMime</a>, <a href="qmacpasteboardmime.html">QMacPasteboardMime</a>, and <a href="dnd.html">Drag and Drop</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMimeData" />QMimeData.__init__ (<i>self</i>)</h3><p>Constructs a new MIME data object with no data in it.</p>
<a name="//apple_ref/cpp/instm/QMimeData/~QMimeData" />
<h3 class="fn"><a name="clear" />QMimeData.clear (<i>self</i>)</h3><p>Removes all the MIME type and data entries in the object.</p>
<a name="//apple_ref/cpp/instm/QMimeData/colorData" />
<h3 class="fn"><a name="colorData" />QVariant QMimeData.colorData (<i>self</i>)</h3><p>Returns a color if the data stored in the object represents a color (MIME type <tt>application/x-color</tt>); otherwise returns a null variant.</p>
<p>A <a href="qvariant.html">QVariant</a> is used because <a href="qmimedata.html">QMimeData</a> belongs to the <a href="qtcore.html">QtCore</a> library, whereas <a href="qcolor.html">QColor</a> belongs to <a href="qtgui.html">QtGui</a>. To convert the <a href="qvariant.html">QVariant</a> to a <a href="qcolor.html">QColor</a>, simply use <a href="qvariant.html#qvariant_cast">qvariant_cast</a>(). For example:</p>
<pre> if (event->mimeData()->hasColor()) {
QColor color = qvariant_cast<QColor>(event->mimeData()->colorData());
...
}</pre>
<p>See also <a href="qmimedata.html#hasColor">hasColor</a>(), <a href="qmimedata.html#setColorData">setColorData</a>(), and <a href="qmimedata.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/data" />
<h3 class="fn"><a name="data" /><a href="qbytearray.html">QByteArray</a> QMimeData.data (<i>self</i>, QString)</h3><p>Returns the data stored in the object in the format described by the MIME type specified by <i>mimeType</i>.</p>
<p>See also <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/formats" />
<h3 class="fn"><a name="formats" />QStringList QMimeData.formats (<i>self</i>)</h3><p>Returns a list of formats supported by the object. This is a list of MIME types for which the object can return suitable data. The formats in the list are in a priority order.</p>
<p>For the most common types of data, you can call the higher-level functions <a href="qmimedata.html#hasText">hasText</a>(), <a href="qmimedata.html#hasHtml">hasHtml</a>(), <a href="qmimedata.html#hasUrls">hasUrls</a>(), <a href="qmimedata.html#hasImage">hasImage</a>(), and <a href="qmimedata.html#hasColor">hasColor</a>() instead.</p>
<p>See also <a href="qmimedata.html#hasFormat">hasFormat</a>(), <a href="qmimedata.html#setData">setData</a>(), and <a href="qmimedata.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasColor" />
<h3 class="fn"><a name="hasColor" />bool QMimeData.hasColor (<i>self</i>)</h3><p>Returns true if the object can return a color (MIME type <tt>application/x-color</tt>); otherwise returns false.</p>
<p>See also <a href="qmimedata.html#setColorData">setColorData</a>(), <a href="qmimedata.html#colorData">colorData</a>(), and <a href="qmimedata.html#hasFormat">hasFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasFormat" />
<h3 class="fn"><a name="hasFormat" />bool QMimeData.hasFormat (<i>self</i>, QString)</h3><p>Returns true if the object can return data for the MIME type specified by <i>mimeType</i>; otherwise returns false.</p>
<p>For the most common types of data, you can call the higher-level functions <a href="qmimedata.html#hasText">hasText</a>(), <a href="qmimedata.html#hasHtml">hasHtml</a>(), <a href="qmimedata.html#hasUrls">hasUrls</a>(), <a href="qmimedata.html#hasImage">hasImage</a>(), and <a href="qmimedata.html#hasColor">hasColor</a>() instead.</p>
<p>See also <a href="qmimedata.html#formats">formats</a>(), <a href="qmimedata.html#setData">setData</a>(), and <a href="qmimedata.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasHtml" />
<h3 class="fn"><a name="hasHtml" />bool QMimeData.hasHtml (<i>self</i>)</h3><p>Returns true if the object can return HTML (MIME type <tt>text/html</tt>); otherwise returns false.</p>
<p>See also <a href="qmimedata.html#setHtml">setHtml</a>(), <a href="qmimedata.html#html">html</a>(), and <a href="qmimedata.html#hasFormat">hasFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasImage" />
<h3 class="fn"><a name="hasImage" />bool QMimeData.hasImage (<i>self</i>)</h3><p>Returns true if the object can return an image; otherwise returns false.</p>
<p>See also <a href="qmimedata.html#setImageData">setImageData</a>(), <a href="qmimedata.html#imageData">imageData</a>(), and <a href="qmimedata.html#hasFormat">hasFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasText" />
<h3 class="fn"><a name="hasText" />bool QMimeData.hasText (<i>self</i>)</h3><p>Returns true if the object can return plain text (MIME type <tt>text/plain</tt>); otherwise returns false.</p>
<p>See also <a href="qmimedata.html#setText">setText</a>(), <a href="qmimedata.html#text">text</a>(), <a href="qmimedata.html#hasHtml">hasHtml</a>(), and <a href="qmimedata.html#hasFormat">hasFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/hasUrls" />
<h3 class="fn"><a name="hasUrls" />bool QMimeData.hasUrls (<i>self</i>)</h3><p>Returns true if the object can return a list of urls; otherwise returns false.</p>
<p>URLs correspond to the MIME type <tt>text/uri-list</tt>.</p>
<p>See also <a href="qmimedata.html#setUrls">setUrls</a>(), <a href="qmimedata.html#urls">urls</a>(), and <a href="qmimedata.html#hasFormat">hasFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/html" />
<h3 class="fn"><a name="html" />QString QMimeData.html (<i>self</i>)</h3><p>Returns a string if the data stored in the object is HTML (MIME type <tt>text/html</tt>); otherwise returns an empty string.</p>
<p>See also <a href="qmimedata.html#setHtml">setHtml</a>(), <a href="qmimedata.html#hasHtml">hasHtml</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/imageData" />
<h3 class="fn"><a name="imageData" />QVariant QMimeData.imageData (<i>self</i>)</h3><p>Returns a <a href="qvariant.html">QVariant</a> storing a <a href="qimage.html">QImage</a> if the object can return an image; otherwise returns a null variant.</p>
<p>A <a href="qvariant.html">QVariant</a> is used because <a href="qmimedata.html">QMimeData</a> belongs to the <a href="qtcore.html">QtCore</a> library, whereas <a href="qimage.html">QImage</a> belongs to <a href="qtgui.html">QtGui</a>. To convert the <a href="qvariant.html">QVariant</a> to a <a href="qimage.html">QImage</a>, simply use <a href="qvariant.html#qvariant_cast">qvariant_cast</a>(). For example:</p>
<pre> if (event->mimeData()->hasImage()) {
QImage image = qvariant_cast<QImage>(event->mimeData()->imageData());
...
}</pre>
<p>See also <a href="qmimedata.html#setImageData">setImageData</a>() and <a href="qmimedata.html#hasImage">hasImage</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/removeFormat" />
<h3 class="fn"><a name="removeFormat" />QMimeData.removeFormat (<i>self</i>, QString)</h3><p>Removes the data entry for <i>mimeType</i> in the object.</p>
<p>This function was introduced in Qt 4.4.</p>
<a name="//apple_ref/cpp/instm/QMimeData/retrieveData" />
<h3 class="fn"><a name="retrieveData" />QVariant QMimeData.retrieveData (<i>self</i>, QString, <a href="qvariant.html#Type-enum">QVariant.Type</a>)</h3><p>Returns a variant with the given <i>type</i> containing data for the MIME type specified by <i>mimeType</i>. If the object does not support the MIME type or variant type given, a null variant is returned instead.</p>
<p>This function is called by the general <a href="qmimedata.html#data">data</a>() getter and by the convenience getters (<a href="qmimedata.html#text">text</a>(), <a href="qmimedata.html#html">html</a>(), <a href="qmimedata.html#urls">urls</a>(), <a href="qmimedata.html#imageData">imageData</a>(), and <a href="qmimedata.html#colorData">colorData</a>()). You can reimplement it if you want to store your data using a custom data structure (instead of a <a href="qbytearray.html">QByteArray</a>, which is what <a href="qmimedata.html#setData">setData</a>() provides). You would then also need to reimplement <a href="qmimedata.html#hasFormat">hasFormat</a>() and <a href="qmimedata.html#formats">formats</a>().</p>
<p>See also <a href="qmimedata.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setColorData" />
<h3 class="fn"><a name="setColorData" />QMimeData.setColorData (<i>self</i>, QVariant)</h3><p>Sets the color data in the object to the given <i>color</i>.</p>
<p>Colors correspond to the MIME type <tt>application/x-color</tt>.</p>
<p>See also <a href="qmimedata.html#colorData">colorData</a>(), <a href="qmimedata.html#hasColor">hasColor</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setData" />
<h3 class="fn"><a name="setData" />QMimeData.setData (<i>self</i>, QString, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the data associated with the MIME type given by <i>mimeType</i> to the specified <i>data</i>.</p>
<p>For the most common types of data, you can call the higher-level functions <a href="qmimedata.html#setText">setText</a>(), <a href="qmimedata.html#setHtml">setHtml</a>(), <a href="qmimedata.html#setUrls">setUrls</a>(), <a href="qmimedata.html#setImageData">setImageData</a>(), and <a href="qmimedata.html#setColorData">setColorData</a>() instead.</p>
<p>Note that if you want to use a custom data type in an item view drag and drop operation, you must register it as a Qt <a href="qmetatype.html">meta type</a>, using the <a href="qmetatype.html#Q_DECLARE_METATYPE">Q_DECLARE_METATYPE</a>() macro, and implement stream operators for it. The stream operators must then be registered with the <a href="qmetatype.html#qRegisterMetaTypeStreamOperators">qRegisterMetaTypeStreamOperators</a>() function.</p>
<p>See also <a href="qmimedata.html#data">data</a>(), <a href="qmimedata.html#hasFormat">hasFormat</a>(), <a href="qmetatype.html">QMetaType</a>, and <a href="qmetatype.html#qRegisterMetaTypeStreamOperators">qRegisterMetaTypeStreamOperators</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setHtml" />
<h3 class="fn"><a name="setHtml" />QMimeData.setHtml (<i>self</i>, QString)</h3><p>Sets <i>html</i> as the HTML (MIME type <tt>text/html</tt>) used to represent the data.</p>
<p>See also <a href="qmimedata.html#html">html</a>(), <a href="qmimedata.html#hasHtml">hasHtml</a>(), <a href="qmimedata.html#setText">setText</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setImageData" />
<h3 class="fn"><a name="setImageData" />QMimeData.setImageData (<i>self</i>, QVariant)</h3><p>Sets the data in the object to the given <i>image</i>.</p>
<p>A <a href="qvariant.html">QVariant</a> is used because <a href="qmimedata.html">QMimeData</a> belongs to the <a href="qtcore.html">QtCore</a> library, whereas <a href="qimage.html">QImage</a> belongs to <a href="qtgui.html">QtGui</a>. The conversion from <a href="qimage.html">QImage</a> to <a href="qvariant.html">QVariant</a> is implicit. For example:</p>
<pre> mimeData->setImageData(QImage("beautifulfjord.png"));</pre>
<p>See also <a href="qmimedata.html#imageData">imageData</a>(), <a href="qmimedata.html#hasImage">hasImage</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setText" />
<h3 class="fn"><a name="setText" />QMimeData.setText (<i>self</i>, QString)</h3><p>Sets <i>text</i> as the plain text (MIME type <tt>text/plain</tt>) used to represent the data.</p>
<p>See also <a href="qmimedata.html#text">text</a>(), <a href="qmimedata.html#hasText">hasText</a>(), <a href="qmimedata.html#setHtml">setHtml</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/setUrls" />
<h3 class="fn"><a name="setUrls" />QMimeData.setUrls (<i>self</i>, list-of-QUrl)</h3><p>Sets the URLs stored in the MIME data object to those specified by <i>urls</i>.</p>
<p>URLs correspond to the MIME type <tt>text/uri-list</tt>.</p>
<p>See also <a href="qmimedata.html#urls">urls</a>(), <a href="qmimedata.html#hasUrls">hasUrls</a>(), and <a href="qmimedata.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/text" />
<h3 class="fn"><a name="text" />QString QMimeData.text (<i>self</i>)</h3><p>Returns a plain text (MIME type <tt>text/plain</tt>) representation of the data.</p>
<p>See also <a href="qmimedata.html#setText">setText</a>(), <a href="qmimedata.html#hasText">hasText</a>(), <a href="qmimedata.html#html">html</a>(), and <a href="qmimedata.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QMimeData/urls" />
<h3 class="fn"><a name="urls" />list-of-QUrl QMimeData.urls (<i>self</i>)</h3><p>Returns a list of URLs contained within the MIME data object.</p>
<p>URLs correspond to the MIME type <tt>text/uri-list</tt>.</p>
<p>See also <a href="qmimedata.html#setUrls">setUrls</a>(), <a href="qmimedata.html#hasUrls">hasUrls</a>(), and <a href="qmimedata.html#data">data</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|