1 //////////////////////////////////////////
#include "test9_2a.h" 2 #include "M_win.h" 3 4 Test9_2A::Test9_2A(QWidget *parent) 5 : QMainWindow(parent) 6 { 7 8 ui.setupUi(this); 9 10 M_win *page = new M_win(); 11 12 ui.stackedWidget->insertWidget(0,page); 13 14 connect(ui.BtnFirst, SIGNAL(clicked()), this, SLOT(OnBtnFirst())); 15 connect(ui.BtnSecond, SIGNAL(clicked()), this, SLOT(OnBtnSecond())); 16 connect(ui.BtnThird, SIGNAL(clicked()), this, SLOT(OnBtnthird())); 17 18 } 19 20 Test9_2A::~Test9_2A() 21 { 22 23 } 24 25 int Test9_2A::OnBtnFirst() 26 { 27 ui.stackedWidget->setCurrentIndex(0); 28 return 0; 29 } 30 31 int Test9_2A::OnBtnSecond() 32 { 33 ui.stackedWidget->setCurrentIndex(1); 34 return 0; 35 } 36 37 int Test9_2A::OnBtnthird() 38 { 39 ui.stackedWidget->setCurrentIndex(2); 40 return 0; 41 }


 

相关文章:

  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-01-01
  • 2022-12-23
  • 2021-08-27
  • 2021-11-17
猜你喜欢
  • 2021-10-09
  • 2022-12-23
  • 2021-08-22
  • 2022-01-15
  • 2022-12-23
  • 2021-08-14
相关资源
相似解决方案