I've got a problem. I use the following Code to convert a std::string into a QString.
std::string testStdStr = "Hello";
QString test = QString::fromStdString(testStdStr);
This code throws a bad_alloc exception unter MSVC 2013 Prof, but only in DEBUG Mode! If I compile in Release Mode everything works as expected.
Some Additional Information: SUBSYSTEM is changed to Windows AND the Entry Point is set to mainCRTStartup
The exception is thrown at the point of initialization of the QString Object! Any suggestions? If you need additional Information, just ask!
This happens when you mix debug libraries and release libraries, check that all the libraries you link are in debug version (qt5cored.lib [not qt5core.lib], qtmaind.lib etc...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With