Good day to you again. I've implemented all demo project, but now i'm facing a problem. I'm receiving data with high frequency, and i need to draw it on my graph. The code is looking like that:

QVector<double> x(1024), y(1024);
/***above the code***/
if (!graph_added)
{
	custom_spectre_plot->addGraph();
	custom_spectre_plot->graph(0)->setPen(QPen(Qt::red));
	custom_spectre_plot->graph(0)->setBrush(QBrush(QColor(Qt::red)));
	graph_added = true;
}		
for (int i = 0; i < size; i++)
{
	x[i] = i;
	y[i] = y_to_plot[i];
}
custom_spectre_plot->graph(0)->setData(x,y);
custom_spectre_plot->graph(0)->rescaleAxes();
custom_spectre_plot->replot();

Output speed is quite fast, but interface is frozen, i can't stop the process. Has anyone encountered that kind of trouble?