There is a memory leak, you should be doing like this
void Videoplayerclass::on_pic1_clicked()
{
videoplayer->stop();
videoplayer->hide();
videoplayer->deleteLater();
Nextwindow *n = new Nextwindow;
n->show();
this->hide();
this->deleteLater();
}
void Nextwindow::on_button_clicked()
{
Videoplayerclass *other = new Videoplayerclass;
other->show();
this->hide();
this->deleteLater();
}
void Videoplayerclass::on_pic1_clicked()
{
videoplayer->stop();
videoplayer->hide();
videoplayer->deleteLater();
Nextwindow *n = new Nextwindow;
n->show();
this->hide();
this->deleteLater();
}
void Nextwindow::on_button_clicked()
{
Videoplayerclass *other = new Videoplayerclass;
other->show();
this->hide();
this->deleteLater();
}
To copy to clipboard, switch view to plain text mode
Bookmarks