Please use CODE tags when posting source code. Geez. How many times do people have to say that?

Qt Code:
  1. void interface2:lot()
  2. {
  3. QChartView view;
  4.  
  5. view.chart()->addSeries(rickerSeries(f));
  6.  
  7. view.chart()->createDefaultAxes();
  8.  
  9. view.setMinimumSize(800, 600);
  10.  
  11. view.show();
  12.  
  13. sleep(10);
  14.  
  15. }
To copy to clipboard, switch view to plain text mode 

Do you understand object lifetimes in C++? What do you think happens to the local QChartView instance you have created on the stack when this slot exits? As for the series not being displayed, the chart will not update itself until the Qt event loop has a chance to run, and that won't happen until the slot exits. And when the slot exits, what happens to the QChartView instance?

It seems to me that you need to take a few steps back and study some of the Qt examples (and C++) until you understand what event-driven programming is all about. You can't take a functional logic C or C++ program and simply convert the functional logic flow and expect it to work the same way in an event-driven framework. In an event-driven program, your code is not in charge of the flow of execution. The Qt event loop is, and it will call functions in your code that are tied to user interface or system events, not the other way around.