E:\111\qt\gc\5214\main.cpp:113: error: 'this' argument to member function 'removeFirst' has type 'const QVector<QStringList>', but function is not marked const
时间: 2023-12-25 10:05:13 浏览: 169
这个错误的意思是,你在一个常量 QVector<QStringList> 上调用了一个非常量成员函数 removeFirst。因为这个 QVector 是常量,所以它的成员函数也需要是常量函数,才能在常量对象上被调用。
你需要将这个成员函数声明为 const,例如:
```cpp
void removeFirst() const;
```
这样就可以在常量对象上调用 removeFirst 了。记得在函数实现的地方也要加上 const。
阅读全文
相关推荐

















