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

前端 未结 1 1108
长发绾君心
长发绾君心 2021-01-25 10:08

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 10:58

    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)
提交回复
热议问题