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. How To pass QAreaSeries Series as an argument into an other function.
Forum Updated to NodeBB v4.3 + New Features

How To pass QAreaSeries Series as an argument into an other function.

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

    Hello everyone,

    I need to know how to pass

                            QLineSeries *series0 = new QLineSeries();
    			QLineSeries *series1 = new QLineSeries();
    
    			*series0 << QPointF(1, 6) << QPointF(1, 10);
    			*series1 << QPointF(4, 6) << QPointF(4, 10);
    
    			QAreaSeries *series = new QAreaSeries(series0, series1);
    

    How to pass "Series" as an argument to another function?

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

      Hi
      Do you mean like

      void SomeFunc(QAreaSeries * serie) {
      ...
      }

      ....
      SomeFunc(series );

      Just as a note.
      Since you normally are in a mainwindow, you can also make
      QAreaSeries *series; a class memeber.
      (put it in .h inside class)

      and make sure you new it like
      series = new QAreaSeries(series0, series1);

      then the variable series is available to all functions of MainWindow.

      1 Reply Last reply
      0

      • Login

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