Module pythonqtpytson :: Class EventFilterObject
[hide private]
[frames] | no frames]

Class EventFilterObject

source code

PythonQt.QtCore.QObject --+
                          |
                         EventFilterObject

Class to install as eventfilter on QObject-based objects. Connect to the signal eventFiltered(QObject*, QEvent*) to receive the filtered event per installEventFilter.

Instance Methods [hide private]
 
__init__(self, typelist=list(), parent=None)
Instantiates a new object.
source code
 
setFilterResult(self, val)
Sets the return value the object should return in the eventFilter-method.
source code
list(int)
types(self)
Returns the current list of eventtypes.
source code
 
addType(self, eventtype)
Adds an eventtype to the list.
source code
 
removeType(self, eventtype)
Removes an eventtype from the list.
source code
Method Details [hide private]

__init__(self, typelist=list(), parent=None)
(Constructor)

source code 

Instantiates a new object.

Parameters:
  • typelist (list(int)) - list of Eventtypes to filter (see QEvent::Type). Defaults to an empty list.
  • parent (QObject) - QObject-parent

setFilterResult(self, val)

source code 

Sets the return value the object should return in the eventFilter-method. If not set, False will be returned

Parameters:
  • val (bool) - the value

types(self)

source code 

Returns the current list of eventtypes.

Returns: list(int)
the current eventtypes

addType(self, eventtype)

source code 

Adds an eventtype to the list.

Parameters:
  • eventtype (int) - an eventtype (see QEvent::Type)

removeType(self, eventtype)

source code 

Removes an eventtype from the list.

Parameters:
  • eventtype (int) - an eventtype (see QEvent::Type)