Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Post by sblancha »

Hello,

How to use qDebug in Qt widget development.
I try different statement according to qDebug qt help but always get the following weird message in PVSS log:
WCCOAui (1), 2017.11.29 11:13:37.670, CTRL, INFO, 0, , îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþkþ>$?b0¨º+Q

Cheers,
Sebastien

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Post by mkoller »

When you use qDebug() you should not see a message like this, since qDebug()s are redirected into the managers log file and not using the ErrHdl,
therefore not having this format you show (e.g. having timestamp, CTRL or INFO in it.)
When you use QDebug with e.g. QtInfoMsg, then the UI always generates a SYSTEM type message and the message id is "Unexpected state".
Therefore, please share more details, e.g. your code snippet

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Post by sblancha »

Thanks Martin for the fast answer.
I am using now Qt5 and WinCC OA 3.15.
I tried many statements, for instance:

qDebug()

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Post by mkoller »

I tried this just to be sure (3.15, Linux openSuse) - no problem.
qDebug()

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Qt Widget: how to send message to PVSS log from Qt Widget (qDebug()??)

Post by sblancha »

I did not try with Linux
but with 3.15 Windows10:
qDebug()

5 posts • Page 1 of 1