Hi All
I'm using the QClipboard class provided by Qt. I'm trying to create a QList that holds the last twenty items that have been copied.
I am declaring the list as follows:
QList<const QMimeData*> *copiedList;
I am creating the list as follows:
copiedList = new QList<const QMimeData*>;
The QClipboard method mimeData returns a const QMimeData* const that contains the copied data. Ideally I want to add this to the QList and then be able to call the QClipboard method setMimeData to update the clipboard data. setMimeData accepts a QMimeData* that is non constant. I am currently unsure about how to best store the const QMimeData* const data and 'convert it' so that it is non constant. The code I have so far is:
if(copiedList->count() > MAXDATACOUNT)
{
copiedList->pop_back();
}
copiedList->push_front(clipboard->mimeData(modes));
clipboard->setMimeData(copiedList->at(0), modes);
I receive an error "Convert between const QMimeData* const and const QMimeData*". Any tips of advice how to get around this, or an alternative solution would be great. Thanks in advance.
Cam