Reputation: 2281
I'm doing:
QMap<QString,Qt::CheckState>::iterator beg = data_.begin();//here data_ is of type QMap<QString,Qt::CheckState>
and qt tells me:
error: conversion from 'QMap::const_iterator' to non-scalar type 'QMap::iterator' requested
Why? I didn't asked for cbegin, so what's the story with this?
Upvotes: 0
Views: 418
Reputation: 38800
Sounds like data_
is const
at this point in time, so the const
version of begin()
will be called. :)
Upvotes: 2