I want to use a class member as a handler for Qt output. Following code fails to compile; I'll appreciate a helping hand
void test
::debugOut(QtMsgType type,
const QMessageLogContext
&context,
const QString &msg
) {
}
void test::onConnect()
{
auto fp = std::bind (&test::debugOut, *this, std::placeholders::_1);
qInstallMessageHandler(fp);
}
void test::debugOut(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
}
void test::onConnect()
{
auto fp = std::bind (&test::debugOut, *this, std::placeholders::_1);
qInstallMessageHandler(fp);
}
To copy to clipboard, switch view to plain text mode
Bookmarks