发布网友 发布时间:2022-04-25 20:11
共1个回答
热心网友 时间:2022-04-18 07:05
qt 点击按钮调用另一个窗口后,新窗口按钮自定义槽函数不执行,...
主窗口按钮的槽函数,点击调用
void Ui_initface::set_clicked()
{
Ui_Dialog udialog;
udialog.setupUi(dialog);
dialog->show();
}
新窗口的槽函数
void Ui_Dialog::save_conf()
{
char s_c[11];
int s_i[8];
memset(s_i,0,8);
QString pstr;
s_i[0]=spinBox0->value();
printf("%d\n",s_i[0]);
s_i[1]=spinBox0_2->value();
pstr=lineEdit_ag->text();
const char *c_pstr = pstr.toLatin1().data();
//printf("%s\n",c_pstr);
strcpy(s_c,c_pstr);
s_i[4]=radioButton_ag1->isChecked();
s_i[5]=radioButton_ag01->isChecked();
s_i[2]=radioButton_a1->isChecked ();
s_i[3]=radioButton_01->isChecked ();
s_i[6]=radioButton_ab1->isChecked ();
s_i[7]=radioButton_ab01->isChecked ();
printf("%d\n",s_i[1]);
printf("%d\n",s_i[2]);
printf("%d\n",s_i[3]);
printf("%d\n",s_i[4]);
printf("%d\n",s_i[5]);
printf("%d\n",s_i[6]);
printf("%d\n",s_i[7]);
Write_Config(s_i,s_c);
emit CloseDialog();
}追问额额。。我用的python。。
就是想知道能不能用 From窗体里的按钮 打开 MainWindow窗体