I used Qt Designer to set a

Qt Code:
  1. QAction *actionTest;
  2. actionTest->setCheckable(true);
  3. actionTest->setChecked(true);
To copy to clipboard, switch view to plain text mode 


which is connected to my own action function
Qt Code:
  1. QObject::connect(ui.actionTest, SIGNAL(activated()), this, SLOT(checkTest()));
To copy to clipboard, switch view to plain text mode 

and my checkTest() is as follows:

Qt Code:
  1. void someClass::checkTest()
  2. {
  3. if(ui.actionTest->isChecked())
  4. ui.actionTest>setChecked ( false );
  5. else
  6. {
  7. ........ // That is where I always jump into
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 


As we can see, although
actionTest->setChecked(true);

has already been set checked, the connected slot function can't see it at all.

What's wrong? Urgent....

please help.

Cheers
JIA