• 大小: 586KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-18
  • 语言: 其他
  • 标签: Qt5  计算器  界面  

资源简介

用Qt5做的计算器,基本上实现了计算器该有的功能,在Qt5以上的版本能直接运行。

资源截图

代码片段和文件信息

#include “calculator.h“

#define BACKGROUND “/li_work/QtDesktop/image/qt_calculator/background.jpg“
#define SHOWLABEL “background-color:rgb(140182152);““border:2px solid rgb(120120120);““color:rgb(000)“
#define REDLABEL “background-color:rgb(1946969);““border:1px solid rgb(474747);““color:rgb(255255255)“
#define EXITBUTTON “background-color:rgb(1946969);““border:1px solid rgb(000);““color:rgb(255255255)“
#define EQUBUTTON “background-color:rgb(22118133);““border:1px solid rgb(000);““color:rgb(000)“

#define BUTTON_1 “/li_work/QtDesktop/image/qt_calculator/1.png“
#define BUTTON_2 “/li_work/QtDesktop/image/qt_calculator/2.png“
#define BUTTON_3 “/li_work/QtDesktop/image/qt_calculator/3.png“
#define BUTTON_4 “/li_work/QtDesktop/image/qt_calculator/4.png“
#define BUTTON_5 “/li_work/QtDesktop/image/qt_calculator/5.png“
#define BUTTON_6 “/li_work/QtDesktop/image/qt_calculator/6.png“
#define BUTTON_7 “/li_work/QtDesktop/image/qt_calculator/7.png“
#define BUTTON_8 “/li_work/QtDesktop/image/qt_calculator/8.png“
#define BUTTON_9 “/li_work/QtDesktop/image/qt_calculator/9.png“
#define BUTTON_0 “/li_work/QtDesktop/image/qt_calculator/0.png“
#define BUTTON_ac “/li_work/QtDesktop/image/qt_calculator/ac.png“
#define BUTTON_add “/li_work/QtDesktop/image/qt_calculator/add.png“
#define BUTTON_del “/li_work/QtDesktop/image/qt_calculator/del.png“
#define BUTTON_div “/li_work/QtDesktop/image/qt_calculator/div.png“
#define BUTTON_dot “/li_work/QtDesktop/image/qt_calculator/dot.png“
#define BUTTON_equ “/li_work/QtDesktop/image/qt_calculator/equ.png“
#define BUTTON_mul “/li_work/QtDesktop/image/qt_calculator/mul.png“
#define BUTTON_pm “/li_work/QtDesktop/image/qt_calculator/pm.png“
#define BUTTON_sub “/li_work/QtDesktop/image/qt_calculator/sub.png“
#define BUTTON_lbra “/li_work/QtDesktop/image/qt_calculator/l_bra.png“
#define BUTTON_rbra “/li_work/QtDesktop/image/qt_calculator/r_bra.png“
#define BUTTON_squ “/li_work/QtDesktop/image/qt_calculator/squ.png“
#define BUTTON_squx “/li_work/QtDesktop/image/qt_calculator/squx.png“
#define BUTTON_evo “/li_work/QtDesktop/image/qt_calculator/evo.png“
#define BUTTON_pre “/li_work/QtDesktop/image/qt_calculator/pre.png“

#define ADD_SS “/li_work/QtDesktop/image/qt_calculator/add_ss.png“
#define SUB_SS “/li_work/QtDesktop/image/qt_calculator/sub_ss.png“
#define MUL_SS “/li_work/QtDesktop/image/qt_calculator/mul_ss.png“
#define DIV_SS “/li_work/QtDesktop/image/qt_calculator/div_ss.png“
#define LEFT   “/li_work/QtDesktop/image/qt_calculator/left.png“
#define RIGHT  “/li_work/QtDesktop/image/qt_calculator/right.png“


Calculator::Calculator(QWidget *parent)
    :QWidget(parent)
{
    setupUi(this);

    signLabel->setText(““);

    widgetInit();

    over = true;
    Level = 0;
    avoidSignPressedContinuous = true;
    bracketStart = false;
    numBeforeBracket = false;

    QRegExp regExp2(“[0-9]{1100}[.][0-9]{1100}“);
    QRegExpValidator *pRegExpValidator2 = new QRegExpValidator(regExp2this);
    lineEdit->se

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-07-04 10:23  qt_calculator\
     文件        3916  2012-04-01 09:03  qt_calculator\0.png
     文件        3435  2012-03-29 16:24  qt_calculator\1.png
     文件        3961  2012-03-29 16:25  qt_calculator\2.png
     文件        3958  2012-03-29 16:26  qt_calculator\3.png
     文件        3694  2012-03-29 16:26  qt_calculator\4.png
     文件        3820  2012-03-29 16:26  qt_calculator\5.png
     文件        4045  2012-03-29 16:26  qt_calculator\6.png
     文件        3702  2012-03-29 16:26  qt_calculator\7.png
     文件        4060  2012-03-29 16:26  qt_calculator\8.png
     文件        3961  2012-03-29 16:26  qt_calculator\9.png
     文件        9062  2012-03-29 14:57  qt_calculator\Makefile
     文件        4447  2012-03-29 16:33  qt_calculator\ac.png
     文件        3541  2012-03-31 17:26  qt_calculator\add.png
     文件        2933  2012-04-01 13:05  qt_calculator\add_ss.png
     文件       17805  2012-03-31 17:29  qt_calculator\background.jpg
     文件       27738  2012-04-01 14:22  qt_calculator\calculator.cpp
     文件        3151  2018-05-31 19:58  qt_calculator\calculator.h
     文件      441564  2012-04-01 14:22  qt_calculator\calculator.o
     文件       17566  2012-04-01 12:49  qt_calculator\calculator.ui
     文件        4436  2012-03-29 16:46  qt_calculator\del.png
     文件        3526  2012-03-29 16:28  qt_calculator\div.png
     文件        2857  2012-04-01 13:07  qt_calculator\div_ss.png
     文件        3136  2012-03-29 16:27  qt_calculator\dot.png
     文件        3208  2012-04-01 11:14  qt_calculator\equ.png
     文件        3550  2012-03-29 17:48  qt_calculator\evo.png
     文件        3363  2012-03-29 17:44  qt_calculator\l_bra.png
     文件        2942  2012-03-31 11:34  qt_calculator\left.png
     文件         572  2018-06-05 20:45  qt_calculator\main.cpp
     文件      183632  2012-04-01 13:45  qt_calculator\main.o
     文件        4865  2012-04-01 13:45  qt_calculator\moc_calculator.cpp
............此处省略15个文件信息

评论

共有 条评论