Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wimleers/qeventlogger

Event Logger for Qt: has the ability to intercept *all* events in a Qt application.
https://github.com/wimleers/qeventlogger

Last synced: 6 days ago
JSON representation

Event Logger for Qt: has the ability to intercept *all* events in a Qt application.

Awesome Lists containing this project

README

        

How to use in your Qt application
---------------------------------

1) Add the QEventLogger.h and QEventLogger.cpp files to your project, and add
them to your .pro file.
2) Subclass QApplication, e.g. in the MyApplication class.
3) Include QEventLogger.h in MyApplication.h and add a QEventLogger member:
QEventLogger * eventLogger;
4) In the MyApplication constructor, initialize the event logger and install
it as an event filter (the first parameter is the basename of the
resulting log files, the second parameter is a pointer to the app's
main window, the dimensions of which will be logged as well, the third
parameter disables/enables screenshots to be taken for each logged event):
this->eventLogger = new QEventLogger("./events", this->mainWindow, true);
this->installEventFilter(this->eventLogger);
5) When you now build your application, you will get .csv files in the same
directory as the application binary, with filenames such as
"events 2010-10-29T20-29-17.csv".
If the screenshot mode is enabled, a directory with a filename such as
"screenshots 2010-10-29T20-29-17" will be created in the current directory.
Within that directory, PNG files can be found with filenames such as
"12345.png", where the number in the filename indicates the relative time
at which the screenshot is made.