In the class of the main window declare the inscriptionQLabel *lblStatus;
In the constructor of the main window class, I initialize and add an inscription to the status panel:
lblStatus = new QLabel(this); ui->statusBar->addWidget(lblStatus); There is a function updateStatusInfo (), which is called in resizeEvent:
void MainWindow::resizeEvent(QResizeEvent *event) { Q_UNUSED(event) ra->redraw(); updateStatusInfo(); } it displays information on the panel:
void MainWindow::updateStatusInfo() { QString info; ... //Здесь формируем текст и выводим его на надпись lblStatus->setText(info); } The program falls on the line `lblStatus-> setText (info); as if the label does not exist. I would like to understand how it turns out.