Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator doesn't accept Q_PROPERTY syntax with MEMBER keyword

QtCreator doesn't accept Q_PROPERTY syntax with MEMBER keyword

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 3 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TiffMaelite
    wrote on last edited by
    #1

    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 )' before MEMBER'" 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_OBJECT
    Q_PROPERTY(QString output MEMBER m_output NOTIFY outputChanged)

    public:
    SH_InOutState(QString output, QString name, QState *parent = 0);
    ...
    signals:
    void outputChanged();
    ...
    private:
    QString m_output;
    }@

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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Ghost
      wrote on last edited by
      #2

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

      Bhoot

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

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

        (Z(:^

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved