0

Hello I have project which i can compile in Qt Creator. Now I installed Visual Studio 2013 Ultimate and Qt AddIn. When I try Debug this project in Visual Studio I get error:
Error 4 error C2661: 'QMap<int, Model*>::QMap' : no overloaded function takes 5 arguments D:\projekt... 24 1 projekt

definition of QMap:

QMap<int, Model*> modelItems =
    {
        {1, new Model("One")},
        {2, new Model("Two")},
        {3, new Model("Three")},
        {4, new Model("Four")},
        {5, new Model("Five")},
    };

And my next question:
* Is there possibility to compile version for Windows Phone if I use qml for GUI ?

Szymson
  • 990
  • 1
  • 13
  • 28
  • 1
    First part of your question is duplicate of this: http://stackoverflow.com/questions/31420407/qmap-iteration-crash – demonplus Nov 05 '15 at 05:05
  • And could you please post two different questions as different questions? – demonplus Nov 05 '15 at 05:06
  • The first part of the question say that QMap cannot be initialized with initializer list, whereas 31420407 discusses a runtime crash. – Vladimir Prus Nov 05 '15 at 06:43
  • Also, I am using initializer list syntax for QMap with VS 2013 and Qt 5.4.1 in real code with no issues, either compile or runtime. And the above code snippet compiles for me as well. What Qt version do you have? – Vladimir Prus Nov 05 '15 at 06:47
  • I'm using Qt 5.5. I will update Visual Studio ASAP and try again. – Szymson Nov 05 '15 at 07:25
  • After updated to Update 5 i get other error: `Error 1 error C2797: 'Model::number': list initialization inside member initializer list or non-static data member initializer is not implemented .../project/model.h ` – Szymson Nov 05 '15 at 11:02

0 Answers0