[Interest] Fixing up console.log() in QtWebEngine
roland at logikalsolutions.com
Thu Mar 21 13:39:28 CET 2019
You can click the SerialKeypad link in this post:
And use the LogikalLogger class for your own purposes. Expose the
singleton via a backend C++ class QML knows about (or try your hand at
exposing a singleton). It logs messages to both syslog and the console
and anyplace else you want to send them. Also understands syslog levels.
You can then call it something like this from within your QML and
backEnd.logDebugMessage( "some text" + var1 + " more text: " + var2)
On 3/7/19 1:27 AM, interest-request at qt-project.org wrote:
> In a normal web browser console.log() takes one or more values as parameters and renders them for the user in some appropriate way. If the first parameter is a string containing %s style escapes it'll do some printf style formatting of the remaining parameters. (https://developers.google.com/web/tools/chrome-devtools/console/api#log ).
> The first parameter of console.log() is converted to a string - e.g. "[Object object]" - and delivered as a QString. The remaining parameters are discarded.
> Does anyone know where inside the Qt-Chromium interface I should start looking if I wanted to improve things?
Roland Hughes, President
More information about the Interest