Compilation errors (OpenCV/QT)

why do you think, there’s any connection to the error ?
what about reading the error msg:

extended initializer lists only available with -std=c++11 or -std=gnu++11

meaning, you need to pass one of those flags to your compiler, to make your code work.

also, just saying – qt is a (quite popular) gui library, just dont assume, the IDE / compiler toolchain it comes with is good at building other things