1. QLineEdit

添加控件后,可以编辑控件的名称,然后使用名称获取和设置值
QString qstrValue = ui->strName->text();
QMessageBox::information(this, "提示", qstrValue);2.窗体导航切换
添加新的对话框,然后引入头文件创建变量,和MFC中一样

this->hide();
m_dlgSet.setModal(true);
m_dlgSet.show();微信扫一扫
1. QLineEdit

添加控件后,可以编辑控件的名称,然后使用名称获取和设置值
QString qstrValue = ui->strName->text();
QMessageBox::information(this, "提示", qstrValue);2.窗体导航切换
添加新的对话框,然后引入头文件创建变量,和MFC中一样

this->hide();
m_dlgSet.setModal(true);
m_dlgSet.show();相关推荐