• PySide 模块
  • PySide.QtCore
  • 内容表

    上一话题

    QMetaEnum

    下一话题

    QPersistentModelIndex

    QBasicTimer

    概要

    函数

    详细描述

    PySide.QtCore.QBasicTimer class provides timer events for objects.

    This is a fast, lightweight, and low-level class used by Qt internally. We recommend using the higher-level PySide.QtCore.QTimer class rather than this class if you want to use timers in your applications. Note that this timer is a repeating timer that will send subsequent timer events unless the PySide.QtCore.QBasicTimer.stop() 函数被调用。

    To use this class, create a PySide.QtCore.QBasicTimer , and call its PySide.QtCore.QBasicTimer.start() function with a timeout interval and with a pointer to a PySide.QtCore.QObject subclass. When the timer times out it will send a timer event to the PySide.QtCore.QObject subclass. The timer can be stopped at any time using PySide.QtCore.QBasicTimer.stop() . PySide.QtCore.QBasicTimer.isActive() returns true for a timer that is running; i.e. it has been started, has not reached the timeout time, and has not been stopped. The timer's ID can be retrieved using PySide.QtCore.QBasicTimer.timerId() .

    Wiggly example uses PySide.QtCore.QBasicTimer to repaint a widget at regular intervals.

    class PySide.QtCore. QBasicTimer
    class PySide.QtCore. QBasicTimer ( QBasicTimer )
    参数: QBasicTimer PySide.QtCore.QBasicTimer

    构造基本计时器。

    PySide.QtCore.QBasicTimer. isActive ( )
    返回类型: PySide.QtCore.bool

    Returns true if the timer is running and has not been stopped; otherwise returns false.

    PySide.QtCore.QBasicTimer. start ( msec , obj )
    参数:

    Starts (or restarts) the timer with a msec milliseconds timeout.

    给定 object 将接收计时器事件。

    PySide.QtCore.QBasicTimer. stop ( )

    停止计时器。

    PySide.QtCore.QBasicTimer. timerId ( )
    返回类型: PySide.QtCore.int

    返回计时器 ID。