I am trying to run the official example for generating pdf with Qt from QtWiki but it crashes with code -1073740940. It happens at this line: QPrinter printer
-1073740940
QPrinter printer