What I have in mind is: any event (mouse, key, actions on widgets) that changes the state of the user's data should be captured. Let me give a trivial example (one or more actions implied in each step):
the user reads x-y data from a file
the user manipulates/changes and saves the data based on some provided functionality
Out of the box, can Qt capture this sequence of actions? As I say in the OP, the intent is to use this log/journal file to debug instead of asking the user to describe the sequence of actions, and also let the user can replay without having to take the actions again.
@dcape yeah, you're absolutely right. thanks for your efforts. I was thinking about conflicts and checked widthChanged() with auto-completion - this is why i decided not to change the title of js function. Thanks, again ;)
Just just launch your app from the console. qDebug, qWarning etc. will be printed to the console too (stdout/stderr). Make sure you don't define QT_NO_DEBUG_OUTPUT -- see http://doc.qt.io/qt-5/debug.html for more info.
One thing in you code is that in your receive function your are looping over each byte you received and ask to update the widget. What is generally done when handling large amount of data in such small amount is that the processing is done in a different thread. Also the UI update should be batched, there's no real benefit to update your QPlainTextEdit content for every single byte you get.