Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Error on initializing QJsonArray
Forum Updated to NodeBB v4.3 + New Features

Error on initializing QJsonArray

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 958 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gongdori
    wrote on last edited by
    #1

    Hi all,

    I have developed a GUI using Qt 5.9 and Visual Studio 2013 on my development system (workstation) and recently copied the project to a new computer which has the same version of Qt and VS. When I tried to compile the project, it showed C2440 error and C2679 error on the code where it simply initializes and set QJsonArray objects. It puzzles me because this problem did not show up on my workstation, but only on the new computer. Can anyone tell me what can be the cause of this issue please?

    Below is the code which shows C2440 error

    QJsonArray boolArray = {false, false, false, false};
    QJsonArray doubleArray = {0.0, 0.0, 0.0, 0.0};
    

    Below is the code which shows C2679 error

    doubleArray = {10, 10, 10, 10};
    

    Thanks,

    gongdori

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you user both installation are exactly the same ? (Versions, build number etc.)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • G Offline
        G Offline
        gongdori
        wrote on last edited by
        #3

        Yes. Both VS and Qt versions are the same on both machines...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What if you use

          QJsonArray boolArray{false, false, false, false};
          QJsonArray doubleArray{0.0, 0.0, 0.0, 0.0};
          

          ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @gongdori said in Error on initializing QJsonArray:

            C2679

            You did install all service packs for Vs 2013 ?

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved