[Qt-qml] Disable initial qmlviewer warning + console.print() to STDOUT
Mark Constable
markc at renta.net
Sat Nov 19 11:58:55 CET 2011
I'd like to use qmlviewer for some simple non-gui terminal tasks
mainly to do with dumping both system and script state. This is the
simplest console script I can come up with but I can't find any
mechanism to disable that redundant (to me) first debug line...
import QtQuick 1.0
Item {Component.onCompleted:{console.log("Hello World!");Qt.quit()}}
~ qmlviewer hello-world-cli.qml
Qml debugging is enabled. Only use this in a safe environment!
Hello World!
These 2 do not work...
qmlviewer -warnings hide hello-world-cli.qml
qmlviewer hello-world-cli.qml 2>/dev/null
and this one... well...
~ QT_FATAL_WARNINGS=1 qmlviewer hello-world-cli.qml
Qml debugging is enabled. Only use this in a safe environment!
Aborted (core dumped)
An associated suggestion is to provide perhaps a "console.print"
function that sends to STDOUT and some of us may be able to
squeeze some console goodness out of QML and the standard qmlviewer.
More information about the Qt-qml
mailing list