Esempio n. 1
0
    def mimeData(self, indexes):
        arts = [self.artists[index.row()] for index in indexes]
        layers = [a.layer for a in arts]

        if len(indexes) == 0:
            return 0
        return PyMimeData(arts, **{LAYERS_MIME_TYPE: layers})
Esempio n. 2
0
 def mimeData(self, indices):
     data = self.glue_data(indices)
     result = PyMimeData(data, **{LAYERS_MIME_TYPE: data})
     self._mime = result  # hold reference to prevent segfault
     return result