QDomDocument createElement Segmentation Fault
I am getting a segmentation fault when calling QDomDocument::createElement. My code looks like this:
QDomDocument testDom;
QDomElement root = testDom.createElement("root");
I've also tried:
QDomDocument testDom("test");
QDomElement root = testDom.createElement("root");
I am using Qt5, and targeting Linux using VisualGDB CMake to build it. This code had previoulsy worked with Qt4 using QMake.
Re: QDomDocument createElement Segmentation Fault
There is nothing wrong with either of those code fragments.
What tools you use to build the executable are irrelevant. But, if you are compiling against Qt5 headers and libraries and your runtime is loading an incompatible version of the shared libraries, that could cause a crash.