It was necessary to create a constant QMap with some set of values:
const QMap<QString,int> my_map{{"field1", 15000}, {"field2", 3000}}; On MinGW, there are no problems on Linux, but VC2013 in QtCreator produces an error C2661 .
How can I solve the problem, leaving the code unchanged?
Update 1
Update MS VS 2013 Express to the latest, 4th version did not give a positive result. By booting, it turned out that this error can be solved only by installing the VC compiler 2015. Well, or, of course, through the use of MinGW. Since reinstalling the compiler, along with Qt, as well as other dependent libraries, is not advisable at the moment, you will have to temporarily abandon the use of the designated initialization lists and apply a solution similar to the @yrHeTaTeJlb answer.
Update 2
I forgot to indicate that after updating the compiler to version 4 (in theory, last, I downloaded it from the Microsoft website), the error changed the number to C2797 .
Qt version 5.7.0 for Windows 64-bit (VS 2013)