Afaik this will not work, you implement the message handler function as a member function for the object, the signature of the function that it qInstallMessageHandleraccepts isvoid myMsgHandler(QtMsgType, const char *);
You can either implement the function as a regular stand-alone function, or use a singleton with a static accessory, for example.
void msgHandler(QtMsgType type, const char * msg)
{
Logger::instance()->handleMessage(type,msg);
}
class Logger
{
static Logger* instance() {... }
void handleMessage(QtMsgType type, const char* msg) { ... }
}
qInstallMsgHandler