when the code to draw graph is placed in constructor the graph the graph is drawn fine , but while using the same code in slot of pushButton to draw graph the graph is only drawn when window size is changed
when the code to draw graph is placed in constructor the graph the graph is drawn fine , but while using the same code in slot of pushButton to draw graph the graph is only drawn when window size is changed
Please read the basic plotting tutorial more carefully. You're forgetting to call replot.
http://www.qcustomplot.com/index.php/tutorials/basicplotting