1

我在使用 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> 继承,也许这是个问题?

非常感谢!

4

1 回答 1

0

我想到了。我使用了一些已经定义了多边形的 CAD 库。编译器消息没有帮助 =(

可以关闭。

于 2014-09-02T14:08:52.487 回答