You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Martinez edited this page Jul 17, 2015
·
5 revisions
The first thing that we need to do is to import introspeqt:
importintrospeqt
Once done, we need to specify the folder in which we want to save the log file created by introspeqt. That is done setting the log_path variable of the module recently imported:
introspeqt.log_path = r'x:\data\'
QEvents are specified by adding them to event_list of the introspeqt module. (if none is specified, the only event tracked will be QEvent.Type.MouseButtonPress):
Finally, we want to call log_usage of the instrospeqt module in order to install an event filter on the widgets of your application.
handler = introspeqt.log_usage(app)
Notice that the function requires us to pass a reference to the QApplication object. It is also important to notice that we want to retrieve the value returned by the function so it stays alive during the execution of our application.