I would change that to connect() right after creating the object.
And there is no need to disconnect, the object is gone afterwards.
Neither of which is even necessary if you use a QPointer to track the object and only create one when you need it.
private:
QPointer<frmTest> oTestFrame;
private:
QPointer<frmTest> oTestFrame;
To copy to clipboard, switch view to plain text mode
void frmMain::on_btnOpenNew_clicked()
{
if (!oTestFrame) {
oTestFrame = new frmTest();
oTestFrame->show();
}
}
void frmMain::on_btnOpenNew_clicked()
{
if (!oTestFrame) {
oTestFrame = new frmTest();
oTestFrame->show();
}
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks