在一级窗口的操函数中做以下代码
  QDialog *dialog = new QDialog(this);
  QPushButton *pushButton = new QPushButton;
  QComboBox *comboBox = new QComboBox;
  push -> setText(tr("exit"));
  QHBoxLayout *pDlgLayout = new QHBoxLayout(dialog);
  pDlgLayout -> addWidget(pushButton);
  pDlgLayout -> addWidget(comboBox);
 
  QDialog c;
  c.exec();
生成的是白板,按键和下拉窗没添加进去,求解