准备条件:讯为的4412板子,烧写支持qt的程序。
1:简易一个简单的qt程序,带有四个按键,一个textEdit,便于记录操作步骤
led_display.h
#ifndef LED_DISPLAY_H
#define LED_DISPLAY_H
#include <QWidget>
#include <QTextEdit>
#include <QPushButton>
#include "led.h"
namespace Ui {
class led_display;
}
class led_display : public QWidget
{
Q_OBJECT
public:
explicit led_display(QWidget *parent = 0);
~led_display();
private slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked();
void led1OffHandler(void);
void led1OnHander(void);
void clearHander(void);
private:
Ui::led_display *ui;
QTextEdit *textEdit;
QPushButton *pBtLedOn;
QPushButton *pBtLedOn1;
QPushButton *pBtLedOff;
QPushButton *pBtLedOff1;
QPushButton *pBtClear;
led *ledobj;
};
#endif // LED_DISPLAY_H
led_displ