资源简介
c++编写的QT平台上的计算器小程序,跟windows7上自带的一样,并且可以三个计算器切换,原创。
代码片段和文件信息
#include “alluse.h“
#include
#include
#include
alluse::alluse()
{
QPushButton * pMCBtn = new QPushButton(“MC“);
QPushButton * pMRBtn = new QPushButton(“MR“);
QPushButton * pMSBtn = new QPushButton(“MS“);
QPushButton * pMPlusBtn = new QPushButton(“M+“);
QPushButton * pMMinusBtn = new QPushButton(“M-“);
QPushButton * pBackSpaceBtn = new QPushButton(QStringLiteral(“←“));
QPushButton * pCEBtn = new QPushButton(“CE“);
QPushButton * pCBtn = new QPushButton(“C“);
QPushButton * pPMBtn = new QPushButton(QStringLiteral(“±“));
QPushButton * pRadicalBtn = new QPushButton(QStringLiteral(“√“));
QPushButton * p0Btn = new QPushButton(“0“);
QPushButton * p1Btn = new QPushButton(“1“);
QPushButton * p2Btn = new QPushButton(“2“);
QPushButton * p3Btn = new QPushButton(“3“);
QPushButton * p4Btn = new QPushButton(“4“);
QPushButton * p5Btn = new QPushButton(“5“);
QPushButton * p6Btn = new QPushButton(“6“);
QPushButton * p7Btn = new QPushButton(“7“);
QPushButton * p8Btn = new QPushButton(“8“);
QPushButton * p9Btn = new QPushButton(“9“);
QPushButton * pDivideBtn = new QPushButton(“/“);
QPushButton * pRemainderBtn = new QPushButton(“%“);
QPushButton * pReciprocalBtn = new QPushButton(“1/x“);
QPushButton * pMultiplyBtn = new QPushButton(“*“);
QPushButton * pAddBtn = new QPushButton(“+“);
QPushButton * pMinusBtn = new QPushButton(“-“);
QPushButton * pEqualBtn = new QPushButton(“=“);
QPushButton * pPointBtn = new QPushButton(“.“);
this->addWidget(pMCBtn 0 0);
this->addWidget(pMRBtn 0 1);
this->addWidget(pMSBtn 0 2);
this->addWidget(pMPlusBtn 0 3);
this->addWidget(pMMinusBtn 0 4);
this->addWidget(pBackSpaceBtn 1 0);
this->addWidget(pCEBtn 1 1);
this->addWidget(pCBtn 1 2);
this->addWidget(pPMBtn 1 3);
this->addWidget(pRadicalBtn 1 4);
this->addWidget(p7Btn 2 0);
this->addWidget(p8Btn 2 1);
this->addWidget(p9Btn 2 2);
this->addWidget(pDivideBtn 2 3);
this->addWidget(pRemainderBtn 2 4);
this->addWidget(p4Btn 3 0);
this->addWidget(p5Btn 3 1);
this->addWidget(p6Btn 3 2);
this->addWidget(pMultiplyBtn 3 3);
this->addWidget(pReciprocalBtn 3 4);
this->addWidget(p1Btn 4 0);
this->addWidget(p2Btn 4 1);
this->addWidget(p3Btn 4 2);
this->addWidget(pMinusBtn 4 3);
this->addWidget(pEqualBtn 4 4 2 1);
pEqualBtn->setSizePolicy(QSizePolicy::Expanding QSizePolicy::Expanding);
this->addWidget(p0Btn 5 0 1 2);
p0Btn->setSizePolicy(QSizePolicy::Expanding QSizePolicy::Expanding);
this->addWidget(pPointBtn 5 2);
this->addWidget(pAddBtn 5 3);
pMCBtn->setSizePolicy(QSizePolicy::Expanding QSizePolicy::Expanding);
pMRBtn->setSizePolicy(QSizePolicy::Expanding QSizePolicy::Expanding);
pMSBtn->setS
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-21 16:26 ThreeCalculators\
文件 523 2018-08-08 17:13 ThreeCalculators\ThreeCalculators.pro
文件 18776 2018-08-21 16:26 ThreeCalculators\ThreeCalculators.pro.user
文件 4929 2018-08-08 17:14 ThreeCalculators\alluse.cpp
文件 152 2018-08-08 17:14 ThreeCalculators\alluse.h
文件 952 2018-08-08 17:22 ThreeCalculators\main.cpp
文件 1991 2018-08-08 17:22 ThreeCalculators\mainwindow.cpp
文件 480 2018-08-08 17:20 ThreeCalculators\mainwindow.h
文件 654 2018-08-08 17:00 ThreeCalculators\mainwindow.ui
文件 7164 2018-08-08 17:18 ThreeCalculators\programer.cpp
文件 166 2018-08-08 17:19 ThreeCalculators\programer.h
文件 6103 2018-08-08 17:22 ThreeCalculators\science.cpp
文件 160 2018-08-08 17:14 ThreeCalculators\science.h
文件 560 2018-08-08 17:33 ThreeCalculators\standard.cpp
文件 164 2018-08-08 17:14 ThreeCalculators\standard.h
相关资源
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- Qt 瑞士军刀开发工具
- FTP客户端源码(c++)
- qt处理图形
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
- VC++基于OpenGL模拟的一个3维空间模型
- QT CAN例程
- c++ 虚拟摄像头
- 使用Qt实现Excel读取工具
- Qt 通讯软件模块的开发
- Qt TCP聊天室demo
- hook,捕获所有案件,查找所有窗口,
- C语言课设计算器
- c++ 简易贪吃蛇源码
- 高精度加法(c++代码)
- C++调用百度地图案例
- 北京化工大学计算方法(C/C++)讲义
- 基于VC++的SolidWorks二次开发SolidWorks
- c++ 模拟鼠标按键
- OFD编辑器
- Beginning C++17 From Novice to Professional
- C++ STL实现
- opencv手部轮廓识别以及轨迹识别
- 百度C++编码规范
- C++ sql2008 WebServer通讯.docx
- c++ 定时关机程序源码
评论
共有 条评论