Obsolete Members for QTimer

QTimer 클래스의 다음 멤버는 더 이상 사용되지 않습니다. 이들은 이전 소스 코드의 작동을 유지하기 위해 제공됩니다. 새 코드에서는 사용하지 않는 것이 좋습니다.

정적 공용 멤버

(deprecated in 6.8) void singleShot(int msec, const QObject *receiver, const char *member)
(deprecated in 6.8) void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member)

멤버 함수 문서

[static, deprecated in 6.8] void QTimer::singleShot(int msec, const QObject *receiver, const char *member)

이 함수는 6.8부터 더 이상 사용되지 않습니다. 새 코드에 사용하지 않는 것이 좋습니다.

크로노 오버로드 사용. 이 정적 함수는 주어진 시간 간격 후에 슬롯을 호출합니다.

이 함수를 사용하면 timerEvent 또는 로컬 QTimer 객체를 만들 필요가 없으므로 매우 편리합니다.

예시:

#include <QApplication>
#include <QTimer>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QTimer::singleShot(600000, &app, QCoreApplication::quit);
    ...
    return app.exec();
}

이 샘플 프로그램은 10분(600,000밀리초) 후에 자동으로 종료됩니다.

receiver 은 수신 객체이고 member 은 슬롯입니다. 시간 간격은 msec 밀리초입니다.

참고: 이 함수는 재진입입니다.

start()도 참조하세요 .

[static, deprecated in 6.8] void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member)

이 함수는 6.8부터 더 이상 사용되지 않습니다. 새 코드에서 이 함수를 사용하지 않는 것이 좋습니다.

이 함수는 과부하가 걸린 함수입니다.

크로노 오버로드를 사용하세요. 이 정적 함수는 주어진 시간 간격 후에 슬롯을 호출합니다.

이 함수를 사용하면 timerEvent 또는 로컬 QTimer 객체를 만들 필요가 없으므로 매우 편리합니다.

receiver 은 수신 객체이고 member 은 슬롯입니다. 시간 간격은 msec 밀리초입니다. timerType 은 타이머의 정확도에 영향을 줍니다.

참고: 이 함수는 재진입입니다.

start()도 참조하세요 .

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.