Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to track SIGNAL(s) ?



  • I may have asked this before, if so just humor me.

    I did some limited research and found this

    If you need real time feedback on console, you can check then implementation of QTest. There is a -vs command line switch (Qt doc) which enables all signals printout on console (or you can just run your QTest tests with -vs switch, if you need the signals info only in tests, not in actual application).
    

    I can add QTest but "adding -vs to command line " is a mystery.

    I have this in .pro file

    # disable all warnings add 25/11/2020
    QMAKE_CXXFLAGS += -w
    # -vs QTest invalid option ??
    

    and -vs is "invalid option "

    how do I implement QTest ?
    and is there as resource / tutorial on how to actually code QTest for specific, desired SIGNAL?

    I assume that it is not too practical to have ALL SIGNALS / events display on console.

    Cheers


  • Banned

    This post is deleted!


  • @AnneRanch said in How to track SIGNAL(s) ?:

    and is there as resource / tutorial on how to actually code QTest for specific, desired SIGNAL?

    I have not used it myself, but have you seen QSignalSpy Class, which allows you to track selected signals? So far as I know, that only requires

    Header: #include <QSignalSpy>

    qmake: QT += testlib


Log in to reply