[Qt-interest] mime data

Robert Hairgrove evorgriahr at hispeed.ch
Tue Dec 30 17:06:00 CET 2008


ami guru wrote:
> When implementing drag and drop support in a custom model, it is 
> possible to export items of data in specialized formats by 
> reimplementing the following function - as specified in the manual:
> 
> QMimeData mimeData(const QModelIndexList&) const
> 
> I have string and icon that need to be set. Icon type is not defined in 
> the QMimeData .
> 
> Should i subclass QMimeData or use the QMimeData::setData() .

You probably want to use this function:

void QMimeData::setImageData ( const QVariant & image );

Bob



More information about the Qt-interest-old mailing list