I did as Spinkoo suggested.
Created QLabel in MainWindow constructor and created function which is used to position QLabel over QChart. That function must be called after the constructor of the MainWindow, because then all of the sizes and positions of the widgets and layouts are known. That function is called after the constructor of the MainWindow and each time when Resize event happens.
void MainWindow::positionLabel()
{
// ui->widget inside which is QChart
// ui->verticalLayout inside which is ui->widget
QPoint pos = ui->widget->pos() + ui->verticalLayout->geometry().topLeft();
// m_title pointer to QLabel which is created inside constructor
m_title->setGeometry(pos.x() + 10, pos.y() + 20, ui->widget->width() - 20, CHART_TITLE_SIZE * 2.2);
this->repaint();
return;
}
This is pretty much a workaround solution, probably there should be a way to create custom QChart class which will have the look as the chart from the question. So, if someone knows how to do that, I'd appreciate sharing.