I have created a form MainWindow - QMainWindow class and a Frame - QFrame class , after that in the mainwindow.ui.
I have added a button and created a new singnal clicked > openframe , after, in the mainwindow.h i have added public slots : void openframe() , after that in the mainwindow.cpp i have added:
#include "frame.h"

and

void MainWindow :: openframe()
{
Frame frame();
frame.exec();
}

but it is not working

please help me to connect these two frame with button click