3.7.1 Single Callbacks

SoQtRenderArea is a class using a single callback and its use is demonstrated by examples/Mentor/10_2_setEventCB.py and the ``better style'' examples/Mentor/10_2iv_setEventCB.py.

Usage examples are:

  1. To set a callback function and data:
    myRenderArea.setEventCallback(
        myAppEventHandler, CallbackData(myTicker, myRenderArea))
    

  2. To set a callback function without data (in C++ the second argument is sometimes optional, but IVuPy always requires a second None argument):
    myRenderArea.setEventCallback(myAppEventHandler, None)
    

  3. To disable a callback function:
    myRenderArea.setEventCallback(None, None)