Qt 5.10 Book Examples
MyForm.h
Go to the documentation of this file.
1 // ======================================================================
2 // MyForm.h
3 // ======================================================================
4 // This file is a part of the book
5 // "Qt 5.10 Professional programming with C++"
6 // http://qt-book.com
7 // ======================================================================
8 // Copyright (c) 2017 by Max Schlee
9 // ======================================================================
10 
11 #pragma once
12 
13 #include "ui_MyForm.h"
14 
15 // ======================================================================
16 class MyForm : public QWidget, public Ui::MyForm {
17  Q_OBJECT
18 
19 public:
20  MyForm(QWidget* pwgt = 0) : QWidget(pwgt)
21  {
22  setupUi(this);
23 
24  connect(m_cmdReset, SIGNAL(clicked()), SLOT(slotReset()));
25  }
26 
27 public slots:
28  void slotReset()
29  {
30  m_sld->setValue(0);
31  m_lcd->display(0);
32  }
33 };
34 
MyForm(QWidget *pwgt=0)
Definition: MyForm.h:20
void slotReset()
Definition: MyForm.h:28
Definition: MyForm.h:16