26 QUiLoader* puil =
new QUiLoader(
this);
27 QFile file(
":/MyForm.ui");
29 QWidget* pwgtForm = puil->load(&file);
31 resize(pwgtForm->size());
33 m_psld = pwgtForm->findChild<QSlider*>(
"m_sld");
34 m_plcd = pwgtForm->findChild<QLCDNumber*>(
"m_lcd");
36 QPushButton* pcmdReset =
37 pwgtForm->findChild<QPushButton*>(
"m_cmdReset");
38 connect(pcmdReset, SIGNAL(clicked()), SLOT(
slotReset()));
40 QPushButton* pcmdQuit =
41 pwgtForm->findChild<QPushButton*>(
"m_cmdQuit");
42 connect(pcmdQuit, SIGNAL(clicked()), qApp, SLOT(quit()));
45 QHBoxLayout* phbxLayout =
new QHBoxLayout;
46 phbxLayout->addWidget(pwgtForm);
47 setLayout(phbxLayout);