Program ape - step on the road to bug

This is a new start from the pit, but fortunately today we climbed up ;

With Ui programming interface, most want to thank my partner Qiao Meixuan; here I feel the need to applause and screaming all the way with me went flying;

First, pair programming project: UI little early with high mathematics learning software

 

1, user registration function. The user's phone number, click on the registration will receive a registration code, the user can use this registration code to complete the registration;

2, after the completion of user registration, password prompt interface, user input password matches the password twice after the success. 6-10 password, the case must contain letters and numbers. Users can change the password, enter the correct password in the log in the original state, change your password after successfully re-enter the same new password twice;

3, after the password has been set, jump to the selection interface, display interface elementary, middle and high school three options, the user clicks on one of them, prompting the user to enter the number of items need to be generated;

4, the number of items the user input, generating a piece of paper (with a roll can not have the same title, all entitled multiple choice), the interface displays the first question and casual working four options, the user selects one of the four options submission interface displays the second question, ... until the last question;

5, after the submission of the last question, the display interface, the score is calculated based on the percentage of correct answers;

6, the user interface can opt out of the score or continue to do problems;

7, small high math problem and asked to see the beginning of a personal project.

Second, the experiment environment to build +

We are using python language; the use of software pyqt5 + eric6 when doing graphical interface; of course, this is a magnificent epic achievement from scratch, it is for us to get excited; a thought from the beginning is the hardest SMS call interface, only made himself is stupid after doing; yes if you think you are actually not the hardest;

Environment configuration, software installation; consequently did not say all the tears, the good life is about more than reference links. . . . .

[pyqt5+eric6+anacode]  https://blog.csdn.net/FenDouZuoQingChun/article/details/87934174

Also remember to install a version of the set, I could not find specific links;

Third, the use of early experience

This software is Shuangwai with them, but installation is really tragic pit; pyqt5 qt is a derivative product, so there is not much difference in the use of Le, properly properly tugged flattered

This is the designer interface, where you can drag and drop controls

This is eric6 interface, where code can be generated

 

Fourth, proud of the achievements reached interface

Also do not speak on the map (the background is our own design of it)

 

 

 

 

 

 

V. mentality

1. When they really started the whole person bad, but fortunately perseverance of his teammates, which I very should learn from her. That it was too depressed, no matter what happens in the future I have to refuel to try; I believe I will get stick

2. From the beginning of the beginning, jump interface problems themselves tangled for a long time to no avail, and then I just need to call for some functions;

DEF on_pushButton_2_clicked (Self): 
        "" "
        Click the button to link to jump
     Slot Documentation goes here Wallpaper.
        " ""
        # TODO: not yet Implemented The
        # The raise NotImplementedError
        Import registerone
        self.next = under registerone.Dialog1_5 () # interface call a
        self. use Close ()
        self.next.show ()

3. The logical separation of code and interface code, mainly eric6 automatically generate code directly call was wrong, I let the whole person not good; later also carefully understand the whole function to understand the reasons;

4. We used for the generation of the individual events formula teammates formulas generating function;

5.计算结果进行比较的时候,这里才是险象环生;我写的逻辑代码,调用函数eval()直接计算结果;这里一开始自己机子上试很多的结果都是正确的,但是在队友自动生成公式后猜错的离谱,没有一次是对的,然后我们真的调了一下午的bug;传递的公式包含不能自动计算的=好,去括号没有去完全;边界条件没有考虑,等等真的是无厘头的错误着;

6.插入短信接口的时候,才发现这里是最幸福的时刻;开始的时候自己申请阿里云账号,把短信需要的模板签名 密钥密匙一条龙服务全部搞定;所以我们只需要添加这些东东在从函数直接调用即可;

7.导出exe文件的时候自己依旧是错误的,后来发现只需要添加一段代码即可,(没有原因插入即可):

import sys, os
if hasattr(sys, 'frozen'):
    os.environ['PATH'] = sys._MEIPASS + ";" + os.environ['PATH']
from PyQt5 import QtCore, QtWidgets, QtGui
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import pyqtSlot

 特别感谢:

https://blog.csdn.net/shangxiaqiusuo1/article/details/81035046

https://blog.csdn.net/ZhangWanyu_/article/details/84930159

https://blog.csdn.net/weixin_34146805/article/details/86075695

https://blog.csdn.net/u013419318/article/details/84657117

https://blog.csdn.net/j497205974/article/details/80799461

https://blog.csdn.net/zwyact/article/details/99778898

(记得还有一些当时没有保存,嘿嘿(●ˇ∀ˇ●))

Guess you like

Origin www.cnblogs.com/luning-6-1/p/11604771.html