Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. // My s1 state never seems to transition when I signal the correct signal. However I do see the signal being posted
  2.  
  3. NiesDriver::NiesDriver(QObject * parent) : QObject(parent)
  4. {
  5.     QStateMachine machine;
  6.     QState *s1 = new QState();
  7.     QState *s2 = new QState();
  8.     QSignalTransition *t1 =
  9.     s1->addTransition(this,SIGNAL(pinChange()),s2);
  10.  
  11.  
  12.     machine.addState(s1);
  13.     machine.addState(s2);
  14.     machine.setInitialState(s1);
  15.  
  16.     machine.start();
  17.     connect(s2,SIGNAL(entered()),this,SLOT(onMyStateEntered())); // this is never called I assume entered() is never signaled??
  18.  
  19.  
  20.     //connect(this,SIGNAL(testSignal()),this,SLOT(onMyStateEntered())); // this one works proving it is emitting testSignal
  21.  
  22.     cardCounter(10); // this emits testSignal
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement