daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top