سؤال

Here's the context: I am working an a Maya Plugin. One of the features require me to Drag an element from the Outliner Window onto a UI element of my plugins UI. (Everything in Maya is in Qt) From the outliner, i can drag an item and drop it. For anyone familiar with Qt, you will know that the DropEvent comes with a QMimeData object. This object contains data from the drag&drop source (the Outliner window). In my case, the QMimeData format is "application/x-maya-data". The QByteArray returned by QMimeData.data() is 8 bytes long, the first 4 beeing NULL. So, my hunch is that this is a pointer to some Data Type.

So, here's the question: Is there ANY way of determining what type of data a pointer points to? I've tried casting it into a few Maya data structures (MPxData, MObjectHandle, etc) but without success.

هل كانت مفيدة؟

المحلول

You could try deleting it twice and then running your program in a memory debugger (like valgrind), which will throw an error and show you where the memory has been allocated.

However, you might also consider social sources: the documentation or the project's mailing list.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top