Emulate the Qt key presses that define ``keysequence``.

        The method will put the keys into a queue and process them one
        by one once the event loop is idle, ie. the event loop
        executes all signals and macros associated with the emulated
        key press first before the next one is emulated.

        |Args|

        * ``keysequence`` (**QtmacsKeysequence**): the key sequence to
          emulate.

        |Returns|

        * **None**

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.

def qteEmulateKeypresses(self, keysequence):
        """
        Emulate the Qt key presses that define ``keysequence``.

        The method will put the keys into a queue and process them one
        by one once the event loop is idle, ie. the event loop
        executes all signals and macros associated with the emulated
        key press first before the next one is emulated.

        |Args|

        * ``keysequence`` (**QtmacsKeysequence**): the key sequence to
          emulate.

        |Returns|

        * **None**

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.
        """
        # Convert the key sequence into a QtmacsKeysequence object, or
        # raise an QtmacsOtherError if the conversion is impossible.
        keysequence = QtmacsKeysequence(keysequence)
        key_list = keysequence.toQKeyEventList()

        # Do nothing if the key list is empty.
        if len(key_list) > 0:
            # Add the keys to the queue which the event timer will
            # process.
            for event in key_list:
                self._qteKeyEmulationQueue.append(event)