EDIT: The program was crashing because I used the compiler option "-fshort-enums"  which doesn't play nice with some component in the QSG part of Qt When I removed the option  things started working again