Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QT Addtransition
Qt 6.11 is out! See what's new in the release blog

QT Addtransition

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 795 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.
  • B Offline
    B Offline
    BORHAN CO.
    wrote on last edited by
    #1

    Hi
    I have problem with qt addtransition it shows me this error: QState::addtransition(Qstate *s1 = signal);
    and there is my projects code
    QStateMachine machine;
    QState *s1 = new QState();
    QState *s2 = new QState();
    QState *s3 = new QState();

    QState::addTransition(QState * s1 = signal);
    
    s1->addTransition(s1, SIGNAL(clicked()), s2);
    s2->addTransition(s2, SIGNAL(clicked()), s3);
    s3->addTransition(s3, SIGNAL(clicked()), s1);
    
    machine.addState(s1);
    machine.addState(s2);
    machine.addState(s3);
    
    machine.setInitialState(s1);
    
    machine.start();
    

    Where is my faulth please help me

    kkoehneK 1 Reply Last reply
    0
    • B BORHAN CO.

      Hi
      I have problem with qt addtransition it shows me this error: QState::addtransition(Qstate *s1 = signal);
      and there is my projects code
      QStateMachine machine;
      QState *s1 = new QState();
      QState *s2 = new QState();
      QState *s3 = new QState();

      QState::addTransition(QState * s1 = signal);
      
      s1->addTransition(s1, SIGNAL(clicked()), s2);
      s2->addTransition(s2, SIGNAL(clicked()), s3);
      s3->addTransition(s3, SIGNAL(clicked()), s1);
      
      machine.addState(s1);
      machine.addState(s2);
      machine.addState(s3);
      
      machine.setInitialState(s1);
      
      machine.start();
      

      Where is my faulth please help me

      kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      @BORHAN-CO. can you post the full error?

      Also, does your code really contain the line

      QState::addTransition(QState * s1 = signal);

      If so, what is that supposed to do?

      Director R&D, The Qt Company

      1 Reply Last reply
      2
      • B Offline
        B Offline
        BORHAN CO.
        wrote on last edited by
        #3

        expected primary-expression "*" token

        QState::addTransition(QAbstractTransition*transition);

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          Hi and welcome to devnet,

          What is this line supposed to do ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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