常成员函数里没改变成员变量,怎么会报错?????
//////////头文件#ifndef HEADER1_H_#define HEADER1_H_class Head1:public QHeaderView{ Q_OBJECT..... QStringList strList; void paintSection(QPainter*painter,const QRect&rect,int logicalIndex)const; ......};#endif /*HEADER1_H_*///源文件void Head1::paintSection(QPainter*painter,const QRect&rect,int logicalIndex)const{ .... QString str; str=strList.takeAt(logicalIndex*3+0); ......}编译此文件时会报错,提示如下信息passing `const QStringList' as `this' argument of `T QList<T>::takeAt(int) [with T = QString]' discards qualifiers 请问是什么原因常成员函数调用成员变量,没有改变strList啊,怎么会报错???