Hi,
I have implemented a piece of code in which i have called update() function to be called on a signal of a button clicked() ,some time the update() function is called and paintEvent() works but sometime without following and sequence it doesnt work ...its very surprising ..i have also inclucded some debug statements ,the code is posted below..any help would be appreciated ..!!
..
connect(button,SIGNAL(clicked()),training,SLOT(recognitionAccept()));
..
..
connect(button,SIGNAL(clicked()),training,SLOT(recognitionAccept()));
..
To copy to clipboard, switch view to plain text mode
#include "Progress.h"
#include "TrainNavigation.h"
void TrainingUI::recognitionAccept()
{
..
progress->showAcceptedProgress();
..
navigate->enableNavigationButtons();
}
#include "Progress.h"
#include "TrainNavigation.h"
void TrainingUI::recognitionAccept()
{
..
progress->showAcceptedProgress();
..
navigate->enableNavigationButtons();
}
To copy to clipboard, switch view to plain text mode
void Progress::showAcceptedProgress()
{
qDebug() << "Show Accepted Progress "
..
update();
..
}
void Progress::showAcceptedProgress()
{
qDebug() << "Show Accepted Progress "
..
update();
..
}
To copy to clipboard, switch view to plain text mode
void TrainNavigation::enableNavigationButtons()
{
..
playButton->setDisabled(FALSE);
..
}
void TrainNavigation::enableNavigationButtons()
{
..
playButton->setDisabled(FALSE);
..
}
To copy to clipboard, switch view to plain text mode
both the function (i.e TrainNavigation::enableNavigationButtons() and Progress::showAcceptedProgress() ) are always called but in showAccepetedProgress ...
update() is called sometime ...
Bookmarks