admin管理员组文章数量:1130349
//登录界面
if (LoginFrameBar == nullptr)
{
LoginFrameBar = LoginFrame::Instance();
}
LoginFrame::LoginFrame(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
setWindowFlags(windowFlags()&Qt::WindowCloseButtonHint&~Qt::WindowContextHelpButtonHint);
setFixedSize(this->width(), this->height());
setWindowTitle(QStringLiteral("用户登录"));
clearInfo();
connect(ui.pushButton_login, SIGNAL(clicked()), this, SLOT(onLoginClickSlot()));
}
LoginFrame::~LoginFrame()
{
}
LoginFrame* LoginFrame::Instance()
{
if (!m_gLoginFrame)
{
m_gLoginFrame = new LoginFrame();
}
return m_gLoginFrame;
}
将代码修改为
LoginFrame* LoginFrame::Instance()
{
if (!m_gLoginFrame)
{
m_gLoginFrame = new LoginFrame(0);
}
return m_gLoginFrame;
}
//登录界面
if (LoginFrameBar == nullptr)
{
LoginFrameBar = LoginFrame::Instance();
}
LoginFrame::LoginFrame(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
setWindowFlags(windowFlags()&Qt::WindowCloseButtonHint&~Qt::WindowContextHelpButtonHint);
setFixedSize(this->width(), this->height());
setWindowTitle(QStringLiteral("用户登录"));
clearInfo();
connect(ui.pushButton_login, SIGNAL(clicked()), this, SLOT(onLoginClickSlot()));
}
LoginFrame::~LoginFrame()
{
}
LoginFrame* LoginFrame::Instance()
{
if (!m_gLoginFrame)
{
m_gLoginFrame = new LoginFrame();
}
return m_gLoginFrame;
}
将代码修改为
LoginFrame* LoginFrame::Instance()
{
if (!m_gLoginFrame)
{
m_gLoginFrame = new LoginFrame(0);
}
return m_gLoginFrame;
}
版权声明:本文标题:qt程序在win10正常运行win7电脑上崩溃 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1754832015a2731541.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论