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 2 Mar 2018, 07:24 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.

    V 1 Reply Last reply 2 Mar 2018, 09:47
    0
    • R r3d9u11
      2 Mar 2018, 07:24

      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.

      V Offline
      V Offline
      VRonin
      wrote on 2 Mar 2018, 09:47 last edited by VRonin 3 Feb 2018, 09:48
      #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

      1/2

      2 Mar 2018, 07:24

      • Login

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