Hi all,

I have a custom item model that wraps around QuaZip and is associated with a QTreeView. Think of a ZIP client of sorts. In the view, I am triggering actions on a selection of model indexes that need to act on the according QuaZipFile contents.

On first impulse, I wanted to iterate the model indexes in the view and request QIODevice data from the model for each index. However, I'd need to Q_DECLARE_METATYPE QIODevice or QuaZipFile, and neither provides a copy c'tor as required. Indeed, Qt strongly discourages copy c'tors on *all* QObjects.

Of course I could return the file contents as QByteArray data. This, however, would duplicate potentially very large data when all I need might be to stream the data from one device to another - think of exporting files from the archive.

If any of you could come up with an elegant, well-behaved solution, it would be very much appreciated. Using Qt5 btw. Thanks for your consideration.