QT/Win32 QTimer 체크가 잘 안됩니다.
페이지 정보
작성자
본문
타이머를 스타트 시키고 while(1)루프안에서 타이머 액티브 검사를 하는 데
계속 True가 되서 While 루프를 벗어나지 못합니다.
도와주세요 While안에서 하면 안되는 건지요
Timer->isActive()
QTimer *ResultConfirmTimer;
bool bResultConfirmTimerOn;
public slots:
void RConfirmTimerSlot();
//2012-05-28 ResultConfirmTimer
ResultConfirmTimer = new QTimer;
ResultConfirmTimer->setSingleShot(true);
connect(ResultConfirmTimer, SIGNAL(timeout()), SLOT(RConfirmTimerSlot()));
ResultConfirmTimer->start(200);
bResultConfirmTimerOn = true;
while(1) {
if(ResultConfirmTimer->isActive() == false) break;----->>>> ??????
}
//2012-05-28
void AcadeGame::RConfirmTimerSlot()
{
ResultConfirmTimer->stop();
; //if(curResult == -1) ResultConfirmTimer->start(100);
bResultConfirmTimerOn = false;
}
계속 True가 되서 While 루프를 벗어나지 못합니다.
도와주세요 While안에서 하면 안되는 건지요
Timer->isActive()
QTimer *ResultConfirmTimer;
bool bResultConfirmTimerOn;
public slots:
void RConfirmTimerSlot();
//2012-05-28 ResultConfirmTimer
ResultConfirmTimer = new QTimer;
ResultConfirmTimer->setSingleShot(true);
connect(ResultConfirmTimer, SIGNAL(timeout()), SLOT(RConfirmTimerSlot()));
ResultConfirmTimer->start(200);
bResultConfirmTimerOn = true;
while(1) {
if(ResultConfirmTimer->isActive() == false) break;----->>>> ??????
}
//2012-05-28
void AcadeGame::RConfirmTimerSlot()
{
ResultConfirmTimer->stop();
; //if(curResult == -1) ResultConfirmTimer->start(100);
bResultConfirmTimerOn = false;
}
많은 도움 부탁 드립니다
추천0
댓글목록
워니님의 댓글

그냥 개인적인 의견인데 타이머를 돌릴거라면 굳이 setSingleShot 이 필요할까요...?
도움이 못되었다면 죄송합니다;;;;