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.