Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set data of qtchart by pointer
QtWS25 Last Chance

Set data of qtchart by pointer

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 504 Views
  • 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.
  • R Offline
    R Offline
    r3d9u11
    wrote on last edited by
    #1

    Hi. I have two large arrays (unsigned integer 64) with same length, is it possible to pass these arrays via two pointers as values of Xaxis and Yaxis? Thanks.

    VRoninV 1 Reply Last reply
    0
    • R r3d9u11

      Hi. I have two large arrays (unsigned integer 64) with same length, is it possible to pass these arrays via two pointers as values of Xaxis and Yaxis? Thanks.

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      Not directly, you can do:

      const auto arrLen = std::extent<declype(arrX)>::value;
      Q_ASSERT(std::extent<declype(arrY)>::value == arrLen);
      /* QXYSeries*  m_series; <- in header and created on the heap*/
      for(decltype(arrLen) i=0;i<arrLen;++i)
      m_series->append(arrX[i],arrY[i]);
      

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      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