How to output debug from ModelTest helper class ?
Solved
General and Desktop
-
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_TestTIA
-
Hi,
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 :
QLoggingCategory::setFilterRules("qt.modeltest.debug=true\n");//qt.modeltest