error: type/value mismatch at argument 1 in template parameter list for 'template class QList'

前端 未结 1 1312
天命终不由人
天命终不由人 2021-01-25 10:19

I\'m trying to have a QList and getting the error when compiling! Here\'s my code:

class Right
{
public:
    Right();
    Right(const Right& other);
    Righ         


        
1条回答
  •  一向
    一向 (楼主)
    2021-01-25 11:02

    It means that you have Right defined somewhere else as a variable, enumeration constant or similar. For example here's a test case that reproduces your problem:

    class Right;
    enum { Right };
    QList getRights();
    

    You can make sure that you use the class as follows

    QList getRights();
    

    although it would be better to track down the other definition of Right using an IDE or something else and fix the source of the problem.

    0 讨论(0)
提交回复
热议问题