我在使用 QList 时遇到问题。
T 应该是从 QPolygonF 继承的。
看起来像:
class Polygon : public QPolygonF
{
public:
Polygon(){}
Polygon &operator=(const Polygon &other);
};
当我尝试定义 QList<Polygon> 时,出现以下编译错误:
type/value mismatch [...] for 'template<class T> class QList'
error: expected a type, got 'Polygon'
所以我认为,有些东西是在编译时定义的,但我不明白:(
QPolygonF 被 QVector<QPointF> 继承,也许这是个问题?
非常感谢!