def mimeData(self, items):
        """
        Returns the mime data for dragging for this instance.
        
        :param      items | [<QtGui.QTreeWidgetItem>, ..]
        """
        func = self.dataCollector()
        if func:
            return func(self, items)
        
        data = super(XTreeWidget, self).mimeData(items)
        
        # return defined custom data
        if len(items) == 1:
            try:
                dragdata = items[0].dragData()
            except AttributeError:
                return data
            
            if not data:
                data = QtCore.QMimeData()
            
            urls = []
            for format, value in dragdata.items():
                if format == 'url':
                    urls.append(QtCore.QUrl(value))
                else:
                    data.setData(format, QtCore.QByteArray(value))
            
            data.setUrls(urls)
            return data
        
        return data
def mimeData ( self , items ) : func = self . dataCollector ( ) if func : return func ( self , items ) data = super ( XTreeWidget , self ) . mimeData ( items ) if len ( items ) == 1 : try : dragdata = items [ 0 ] . dragData ( ) except AttributeError : return data if not data : data = QtCore . QMimeData ( ) urls = [ ] for format , value in dragdata . items ( ) : if format == 'url' : urls . append ( QtCore . QUrl ( value ) ) else : data . setData ( format , QtCore . QByteArray ( value ) ) data . setUrls ( urls ) return data return data
Returns the mime data for dragging for this instance.
        
        :param      items | [<QtGui.QTreeWidgetItem>, ..]