[Qt-interest] Drag and Drop Pointers/QModelIndex Within Application
Robert Hairgrove
evorgriahr at hispeed.ch
Mon May 25 16:19:14 CEST 2009
Karol Krizka wrote:
> On Mon, May 25, 2009 at 1:57 PM, Karol Krizka <kkrizka at gmail.com> wrote:
>> On Mon, 2009-05-25 at 12:25 +0200, Robert Hairgrove wrote:
[snip]
> I started to implement my own QMimeData class, as suggested at the end
> of the QMimeData documentation. The documentation also says that I
> need to reimplement "hasFormat(), formats(), and retrieveData()".
> While poking around the source code for QMimeData, to see how the
> function were implemented there, I found out that all data is stored
> as a QVariant, but all the functions for that are private. I know how
> to store a pointer to a QObject inside a QVariant... So, my new
> question is, is there a reason why I cannot directly store my data as
> a QVariant using the stock QMimeData class? Or even using a custom
> derivative (which I'm working on) of the QMimeData class?
What does it matter how the data inside of QMimeData is handled when you
already have a very nice interface for extending it to include your own
types? Stick to the interface, and you will have fewer problems!
More information about the Qt-interest-old
mailing list