Solved 'qDebug() ' can't output text
-
Hi all~
I can't get texts from qDebug() .Besides,when I quit the application,the 'application output' :
QFileSystemWatcher::removePaths: list is empty
QFileSystemWatcher::removePaths: list is empty
what's meaning?How could I solve this problem?? Thanks!
-
Hi and welcome to devnet forum
Probably a problem of howyou call the removePaths member function. You should also post at least the code snippets which are causing this output.
-
@koahnig sorry,I only output a text by qDebug() in simply main function.I not include the "QFileSystemWatcher" class
-
@JoseLpd If you are using Debian related OS to write Qt program, we may well encounter this problem, which confuses me too.
There is no sign to resolve the problem, incompatibility of libraries could be the root of the problem.
I suggest writingqWarning()
andqCritical()
instead of qDebug().Or to
installMessageHandler
to redirect debug information to other places. -
@jiancaiyang Thanks!But I don't know that meaning of '
QFileSystemWatcher::removePaths: list is empty
'.I try to change another version(Qt5.9.3) and problem is same too .I use
qInstallMessageHandler()
to captureqWarning() qCritical() qDebug()
,butqDebug()
can't be captured.That's strange! -
@JoseLpd Try using
qCDebug()
insteadqDebug()
. -
@jiancaiyang Useless and still the same problem.Among these
qCWarning
qCDebug
qCCritical
,onlyqCDebug
can't output message -
@JoseLpd said in 'qDebug() ' can't output text:
@jiancaiyang Useless and still the same problem.Among these
qCWarning
qCDebug
qCCritical
,onlyqCDebug
can't output messageHi, have you tried the suggestions from https://brendanwhitfield.wordpress.com/2016/06/08/enabling-qdebug-on-fedora/ ?
-
@aha_1980 thank you very much!The problem is solved :)
-
@JoseLpd Cool. then please mark this thread as Solved.
Happy New Year!