Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bollos00/qtmessagefilter
A GUI Message Handler used for debugging on Qt/C++ Applications
https://github.com/bollos00/qtmessagefilter
cpp debug debugging-tool qt qt5
Last synced: about 1 month ago
JSON representation
A GUI Message Handler used for debugging on Qt/C++ Applications
- Host: GitHub
- URL: https://github.com/bollos00/qtmessagefilter
- Owner: Bollos00
- License: mit
- Created: 2020-09-13T07:48:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-27T23:22:34.000Z (about 3 years ago)
- Last Synced: 2024-10-13T01:26:09.875Z (2 months ago)
- Topics: cpp, debug, debugging-tool, qt, qt5
- Language: C++
- Homepage: https://github.com/Bollos00/QtMessageFilter
- Size: 440 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [QtMessageFilter](https://github.com/Bollos00/QtMessageFilter)
This repository implements a [Message Handler for Qt Applications](https://doc.qt.io/qt-5/qtglobal.html#QtMessageHandler-typedef). It can be useful if the your aim is to debug code on your Qt Application or generate a log file with all messages registred at the end of the execution of each session. The QtMessageFilter class, that way, contains two features, first it allows you to debug your code with a simple GUI that shows all messages generated with its contexts, secondly it register all those messages on a log file.
![Qt Message Filter example](./share/Screenshot0.png)
If you are using QMake and want to include this feature on your project, just get the content of `./QtMessageFilter` and include the `QtMessageFilter.pri` file on your project, something like:
```qmake
include(QtMessageFilter/QtMessageFilter.pri)
```It can receive messages coming from multiple threads and can be initialized with `QtMessageFilter::resetInstance()`, calling this will install the message handler and make all messages to be treated on the `QtMessageFilter` class. Even tho it is expected to use it during all run time, you can reinstall the default message handler calling `QtMessageFilter::releaseInstance()`, this will also delete the instance of the class. You can omit and show the QtMessageFilter GUI calling `QtMessageFilter::hideDialog()` and `QtMessageFilter::showDialog()`. I have ~~lazily~~ documented the behaviour of this class with a little more details [here](https://github.com/Bollos00/QtMessageFilter/blob/master/QtMessageFilter/src/QtMessageFilter/qtmessagefilter.h).
You may also want to see a silly implementation of on the `tests` directory, the example shows a simple gui that create messages of the four different types each 0,5 seconds. There, it is also possible to hide and show the QtMessageFilter dialog and reinstall the message handler.