[Qt-interest] Doubt in qInstallMsgHandler

Ravi Krishna ravik at softjin.com
Tue May 19 11:27:55 CEST 2009


Hi,
When I run my QT application I am getting the following error
"QList: Out of Memory"
on stdout when the message handler is not set.

To catch all the fatal error messages I set qInstallMsgHandler to myMsgOut.

void myMsgOut(QtMsgType type, const char *msg)
{
   switch (type) {
    case QtCriticalMsg:
        std::cout << msg << std::endl;
        break;
    case QtFatalMsg:
        std::cout << msg << std::endl;
        QMessageBox::critical(NULL, "Fatal error", msg);
        break;
    default:
        std::cout << msg << std::endl;
        break;
    }
}

But after setting the message handler to myMsgOut, the application is 
crashing, without giving any output. I wanted to know is there any 
problem in my message handler function.


Regards,
Ravi krishna.M



Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________





More information about the Qt-interest-old mailing list