Hi,
I use a pointer to a QMap<int, QStringList> and need to change the QStringList, but
m_currentAskedVocBox = 0;
QMap<int, QStringList> *box = (m_currentAskedVocType == lectionSystem::Box) ? &m_boxBox : &m_boxLection;
box[m_currentAskedVocBox+1] << box[m_currentAskedVocBox].takeFirst();
m_currentAskedVocBox = 0;
QMap<int, QStringList> *box = (m_currentAskedVocType == lectionSystem::Box) ? &m_boxBox : &m_boxLection;
box[m_currentAskedVocBox+1] << box[m_currentAskedVocBox].takeFirst();
To copy to clipboard, switch view to plain text mode
throws the error: »class QMap<int, QStringList>« has no element called »takeFirst«.
Seems the compiler does not like the []operator. But how to get a reference on an other way? Unfortunately QMap has no at().
Or my be there ist a way to tell the compiler that "box[]" is a QStringList. casts?
Thanks,
Lykurg
*edit* dereference! (*box)[] works.
Bookmarks