⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

How to output debug from ModelTest helper class ?

  • Hey

    I'm trying to debug my model but I'm hitting a wall with its output. When I look in to source it has stuff like :

       qCDebug(lcModelTest) << "rowsInserted"
                             << "start=" << start << "end=" << end << "parent=" << parent
                             << "parent data=" << model->data(parent).toString()
                             << "current count of parent=" << model->rowCount(parent);

    But none of it gets printed for me, how do I enable it?
    model > https://wiki.qt.io/Model_Test


  • Lifetime Qt Champion


    Please check the QLoggingCategory documentation.

  • @SGaist Yes I did but the modelTest creates its own category > Q_LOGGING_CATEGORY(lcModelTest, "qt.modeltest") and I have no idea how to enable it or what. I have installed my own qInstallMessageHandler() and made sure that default() always prints whatever gets sent to it. But it looks like nothing get sends to it at all.

    Ok looks like I need to run this :


Log in to reply