QtCreator doesn't accept Q_PROPERTY syntax with MEMBER keyword

  • Hello!

    As the title says, if I write the following code snipper in a C++ class, both QtCreator 2.7.2 (bundled with Qt5.1.0 final) and QtCreator2.8.0RC (built with Qt4.8.4) display the warning "expected )' beforeMEMBER'" on the line I declared the property and underlines it in red.

    Am I doing anything wrong or is it a bug?

    Here is my code:

    @class SH_InOutState : public QState
    Q_PROPERTY(QString output MEMBER m_output NOTIFY outputChanged)

    SH_InOutState(QString output, QString name, QState *parent = 0);
    void outputChanged();
    QString m_output;

    Thanks in advance for taking the time to have a look at this :-)

  • I second this question. I am facing the same problem.

  • Moderators

    If the code works, you are not doing anything wrong. Qt Creator probably does not know about this keyword yet.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.