?? cwidget.h
字號:
#ifndef CWIDGET_H
#define CWIDGET_H
#include <qapplication.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qstring.h>
#include <qevent.h>
#include <qmessagebox.h>
class CWidget : public QWidget
{
Q_OBJECT
public:
CWidget(QWidget *parent=0, char *name=0);
~CWidget();
private:
QLineEdit *edit;
QPushButton *button[16];
QVBoxLayout *mainLayout;
QHBoxLayout *topLayout;
QGridLayout *bottomLayout;
int firstNum;
int secondNum;
int oper;
protected slots:
void setValue();
void setOper();
void calculate();
void clear();
protected:
virtual bool event(QEvent *e);
private:
void initialize();
void createForm();
void onClicked(int key);
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -