1

I have a problem with using QList.

T should be an inheritance from QPolygonF.

It looks like:

class Polygon : public QPolygonF
{
public:
    Polygon(){}
    Polygon &operator=(const Polygon &other);
};

When I try to define QList< Polygon>, I get the following compile error:

type/value mismatch [...] for 'template<class T> class QList'
error: expected a type, got 'Polygon'

So I think, something is used to be defined at compile time, but I don't get it :(

QPolygonF is inherited by QVector< QPointF>, maybe this is a Problem?

Thanks a lot!

user982040
  • 11
  • 3
  • I cannot reproduce this problem with the code you provided (Qt 4.x, msvc9). Maybe you have to include the header file where your Polygon is declared? Looks like compiler does not know what the 'Polygon' type is. – vahancho Sep 02 '14 at 12:41
  • i'am using Qt 5.2, MinGW, header files are included – user982040 Sep 02 '14 at 12:46

1 Answers1

0

I figured it out. I used some CAD-Library where Polygon was already defined. Compiler message was not helpful =(

Can be closed.

user982040
  • 11
  • 3