【python】制作一个点单小程序!

news2025/1/10 1:22:45

周末总是在吃的方面,及其纠结,今天来制作一个点单小程序,加入自己喜欢吃的东西,来慢慢挑选,让每个周末快乐无限!

一.安装环境

python 3.7.8

QT

xlrd、xlwt库使用pip接口进行安装

pip install xlrd
pip install xlwt

二.实例

1.首先我们需要先制作一个UI界面出来,这边用到了Qt来实现,代码如下

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(511, 619)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.scrollArea = QtWidgets.QScrollArea(self.centralwidget)
        self.scrollArea.setGeometry(QtCore.QRect(0, 0, 511, 111))
        self.scrollArea.setStyleSheet("background-color: rgb(85, 170, 127);")
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 509, 109))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label.setGeometry(QtCore.QRect(10, 30, 54, 51))
        self.label.setStyleSheet("border-image: url(:/新前缀/1684916689129.png);")
        self.label.setText("")
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_2.setGeometry(QtCore.QRect(70, 50, 81, 31))
        self.label_2.setStyleSheet("background-color: rgb(170, 170, 255);")
        self.label_2.setObjectName("label_2")
        self.label_4 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_4.setGeometry(QtCore.QRect(433, 10, 61, 41))
        self.label_4.setStyleSheet("border-image: url(:/新前缀/1684916954341.png);")
        self.label_4.setText("")
        self.label_4.setObjectName("label_4")
        self.label_5 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.label_5.setGeometry(QtCore.QRect(353, 10, 61, 41))
        self.label_5.setStyleSheet("border-image: url(:/BACK/1684917571038.png);")
        self.label_5.setText("")
        self.label_5.setObjectName("label_5")
        self.toolButton = QtWidgets.QToolButton(self.scrollAreaWidgetContents)
        self.toolButton.setGeometry(QtCore.QRect(350, 60, 71, 31))
        self.toolButton.setObjectName("toolButton")
        self.toolButton_2 = QtWidgets.QToolButton(self.scrollAreaWidgetContents)
        self.toolButton_2.setGeometry(QtCore.QRect(430, 60, 71, 31))
        self.toolButton_2.setObjectName("toolButton_2")
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(0, 112, 511, 401))
        self.tabWidget.setObjectName("tabWidget")
        self.Staple_food = QtWidgets.QWidget()
        self.Staple_food.setObjectName("Staple_food")
        self.scrollArea_2 = QtWidgets.QScrollArea(self.Staple_food)
        self.scrollArea_2.setGeometry(QtCore.QRect(10, 10, 481, 361))
        self.scrollArea_2.setWidgetResizable(True)
        self.scrollArea_2.setObjectName("scrollArea_2")
        self.scrollAreaWidgetContents_2 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 462, 1100))
        self.scrollAreaWidgetContents_2.setMinimumSize(QtCore.QSize(0, 1100))
        self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2")
        self.scrollArea_3 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_3.setGeometry(QtCore.QRect(30, 20, 421, 81))
        self.scrollArea_3.setWidgetResizable(True)
        self.scrollArea_3.setObjectName("scrollArea_3")
        self.scrollAreaWidgetContents_3 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3")
        self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3)
        self.label_3.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_3.setStyleSheet("border-image: url(:/新前缀/1684918877698.png);")
        self.label_3.setText("")
        self.label_3.setObjectName("label_3")
        self.label_6 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3)
        self.label_6.setGeometry(QtCore.QRect(210, 20, 81, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_6.setFont(font)
        self.label_6.setObjectName("label_6")
        self.pushButton = QtWidgets.QPushButton(self.scrollAreaWidgetContents_3)
        self.pushButton.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton.setText("")
        self.pushButton.setObjectName("pushButton")
        self.label_15 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3)
        self.label_15.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_15.setObjectName("label_15")
        self.pushButton_6 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_3)
        self.pushButton_6.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_6.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_6.setText("")
        self.pushButton_6.setObjectName("pushButton_6")
        self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3)
        self.scrollArea_4 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_4.setGeometry(QtCore.QRect(30, 140, 421, 81))
        self.scrollArea_4.setWidgetResizable(True)
        self.scrollArea_4.setObjectName("scrollArea_4")
        self.scrollAreaWidgetContents_4 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4")
        self.label_7 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
        self.label_7.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_7.setStyleSheet("border-image: url(:/新前缀/1684919893294.png);")
        self.label_7.setText("")
        self.label_7.setObjectName("label_7")
        self.label_8 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
        self.label_8.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_8.setFont(font)
        self.label_8.setObjectName("label_8")
        self.pushButton_2 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_4)
        self.pushButton_2.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_2.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_2.setText("")
        self.pushButton_2.setObjectName("pushButton_2")
        self.label_16 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
        self.label_16.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_16.setObjectName("label_16")
        self.pushButton_7 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_4)
        self.pushButton_7.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_7.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_7.setText("")
        self.pushButton_7.setObjectName("pushButton_7")
        self.scrollArea_4.setWidget(self.scrollAreaWidgetContents_4)
        self.scrollArea_5 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_5.setGeometry(QtCore.QRect(30, 260, 421, 81))
        self.scrollArea_5.setWidgetResizable(True)
        self.scrollArea_5.setObjectName("scrollArea_5")
        self.scrollAreaWidgetContents_6 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_6.setObjectName("scrollAreaWidgetContents_6")
        self.label_11 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6)
        self.label_11.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_11.setStyleSheet("border-image: url(:/新前缀/1684919988567.png);")
        self.label_11.setText("")
        self.label_11.setObjectName("label_11")
        self.label_12 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6)
        self.label_12.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_12.setFont(font)
        self.label_12.setObjectName("label_12")
        self.pushButton_4 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_6)
        self.pushButton_4.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_4.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_4.setText("")
        self.pushButton_4.setObjectName("pushButton_4")
        self.label_17 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6)
        self.label_17.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_17.setObjectName("label_17")
        self.pushButton_8 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_6)
        self.pushButton_8.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_8.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_8.setText("")
        self.pushButton_8.setObjectName("pushButton_8")
        self.scrollArea_5.setWidget(self.scrollAreaWidgetContents_6)
        self.scrollArea_6 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_6.setGeometry(QtCore.QRect(30, 380, 421, 81))
        self.scrollArea_6.setWidgetResizable(True)
        self.scrollArea_6.setObjectName("scrollArea_6")
        self.scrollAreaWidgetContents_7 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_7.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_7.setObjectName("scrollAreaWidgetContents_7")
        self.label_13 = QtWidgets.QLabel(self.scrollAreaWidgetContents_7)
        self.label_13.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_13.setStyleSheet("border-image: url(:/新前缀/1684920456823.png);")
        self.label_13.setText("")
        self.label_13.setObjectName("label_13")
        self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents_7)
        self.label_14.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_14.setFont(font)
        self.label_14.setObjectName("label_14")
        self.pushButton_5 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_7)
        self.pushButton_5.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_5.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_5.setText("")
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_9 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_7)
        self.pushButton_9.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_9.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_9.setText("")
        self.pushButton_9.setObjectName("pushButton_9")
        self.scrollArea_6.setWidget(self.scrollAreaWidgetContents_7)
        self.scrollArea_7 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_7.setGeometry(QtCore.QRect(30, 500, 421, 81))
        self.scrollArea_7.setWidgetResizable(True)
        self.scrollArea_7.setObjectName("scrollArea_7")
        self.scrollAreaWidgetContents_9 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_9.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_9.setObjectName("scrollAreaWidgetContents_9")
        self.label_20 = QtWidgets.QLabel(self.scrollAreaWidgetContents_9)
        self.label_20.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_20.setStyleSheet("border-image: url(:/新前缀/1684977055363.png);")
        self.label_20.setText("")
        self.label_20.setObjectName("label_20")
        self.label_21 = QtWidgets.QLabel(self.scrollAreaWidgetContents_9)
        self.label_21.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_21.setFont(font)
        self.label_21.setObjectName("label_21")
        self.pushButton_12 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_9)
        self.pushButton_12.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_12.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_12.setText("")
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_9)
        self.pushButton_13.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_13.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_13.setText("")
        self.pushButton_13.setObjectName("pushButton_13")
        self.scrollArea_7.setWidget(self.scrollAreaWidgetContents_9)
        self.scrollArea_8 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_8.setGeometry(QtCore.QRect(30, 620, 421, 81))
        self.scrollArea_8.setWidgetResizable(True)
        self.scrollArea_8.setObjectName("scrollArea_8")
        self.scrollAreaWidgetContents_10 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_10.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_10.setObjectName("scrollAreaWidgetContents_10")
        self.label_22 = QtWidgets.QLabel(self.scrollAreaWidgetContents_10)
        self.label_22.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_22.setStyleSheet("border-image: url(:/新前缀/1684977425475.png);")
        self.label_22.setText("")
        self.label_22.setObjectName("label_22")
        self.label_23 = QtWidgets.QLabel(self.scrollAreaWidgetContents_10)
        self.label_23.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_23.setFont(font)
        self.label_23.setObjectName("label_23")
        self.pushButton_14 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_10)
        self.pushButton_14.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_14.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_14.setText("")
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_10)
        self.pushButton_15.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_15.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_15.setText("")
        self.pushButton_15.setObjectName("pushButton_15")
        self.scrollArea_8.setWidget(self.scrollAreaWidgetContents_10)
        self.scrollArea_9 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_9.setGeometry(QtCore.QRect(30, 740, 421, 81))
        self.scrollArea_9.setWidgetResizable(True)
        self.scrollArea_9.setObjectName("scrollArea_9")
        self.scrollAreaWidgetContents_11 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_11.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_11.setObjectName("scrollAreaWidgetContents_11")
        self.label_24 = QtWidgets.QLabel(self.scrollAreaWidgetContents_11)
        self.label_24.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_24.setStyleSheet("border-image: url(:/新前缀/1684977503374.png);")
        self.label_24.setText("")
        self.label_24.setObjectName("label_24")
        self.label_25 = QtWidgets.QLabel(self.scrollAreaWidgetContents_11)
        self.label_25.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_25.setFont(font)
        self.label_25.setObjectName("label_25")
        self.pushButton_16 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_11)
        self.pushButton_16.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_16.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_16.setText("")
        self.pushButton_16.setObjectName("pushButton_16")
        self.pushButton_17 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_11)
        self.pushButton_17.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_17.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_17.setText("")
        self.pushButton_17.setObjectName("pushButton_17")
        self.scrollArea_9.setWidget(self.scrollAreaWidgetContents_11)
        self.scrollArea_10 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_10.setGeometry(QtCore.QRect(30, 860, 421, 81))
        self.scrollArea_10.setWidgetResizable(True)
        self.scrollArea_10.setObjectName("scrollArea_10")
        self.scrollAreaWidgetContents_12 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_12.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_12.setObjectName("scrollAreaWidgetContents_12")
        self.label_26 = QtWidgets.QLabel(self.scrollAreaWidgetContents_12)
        self.label_26.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_26.setStyleSheet("border-image: url(:/新前缀/1684977236635.png);")
        self.label_26.setText("")
        self.label_26.setObjectName("label_26")
        self.label_27 = QtWidgets.QLabel(self.scrollAreaWidgetContents_12)
        self.label_27.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_27.setFont(font)
        self.label_27.setObjectName("label_27")
        self.pushButton_18 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_12)
        self.pushButton_18.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_18.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_18.setText("")
        self.pushButton_18.setObjectName("pushButton_18")
        self.pushButton_19 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_12)
        self.pushButton_19.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_19.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_19.setText("")
        self.pushButton_19.setObjectName("pushButton_19")
        self.scrollArea_10.setWidget(self.scrollAreaWidgetContents_12)
        self.scrollArea_11 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_11.setGeometry(QtCore.QRect(30, 980, 421, 81))
        self.scrollArea_11.setWidgetResizable(True)
        self.scrollArea_11.setObjectName("scrollArea_11")
        self.scrollAreaWidgetContents_13 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_13.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_13.setObjectName("scrollAreaWidgetContents_13")
        self.label_28 = QtWidgets.QLabel(self.scrollAreaWidgetContents_13)
        self.label_28.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_28.setStyleSheet("border-image: url(:/新前缀/1684977358561.png);")
        self.label_28.setText("")
        self.label_28.setObjectName("label_28")
        self.label_29 = QtWidgets.QLabel(self.scrollAreaWidgetContents_13)
        self.label_29.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_29.setFont(font)
        self.label_29.setObjectName("label_29")
        self.pushButton_20 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_13)
        self.pushButton_20.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_20.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_20.setText("")
        self.pushButton_20.setObjectName("pushButton_20")
        self.pushButton_21 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_13)
        self.pushButton_21.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_21.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_21.setText("")
        self.pushButton_21.setObjectName("pushButton_21")
        self.scrollArea_11.setWidget(self.scrollAreaWidgetContents_13)
        self.scrollArea_12 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_2)
        self.scrollArea_12.setGeometry(QtCore.QRect(30, 1100, 421, 81))
        self.scrollArea_12.setWidgetResizable(True)
        self.scrollArea_12.setObjectName("scrollArea_12")
        self.scrollAreaWidgetContents_14 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_14.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_14.setObjectName("scrollAreaWidgetContents_14")
        self.label_30 = QtWidgets.QLabel(self.scrollAreaWidgetContents_14)
        self.label_30.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_30.setStyleSheet("border-image: url(:/新前缀/1684977055363.png);")
        self.label_30.setText("")
        self.label_30.setObjectName("label_30")
        self.label_31 = QtWidgets.QLabel(self.scrollAreaWidgetContents_14)
        self.label_31.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_31.setFont(font)
        self.label_31.setObjectName("label_31")
        self.pushButton_22 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_14)
        self.pushButton_22.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_22.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_22.setText("")
        self.pushButton_22.setObjectName("pushButton_22")
        self.pushButton_23 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_14)
        self.pushButton_23.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_23.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_23.setText("")
        self.pushButton_23.setObjectName("pushButton_23")
        self.scrollArea_12.setWidget(self.scrollAreaWidgetContents_14)
        self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2)
        self.tabWidget.addTab(self.Staple_food, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.scrollArea_13 = QtWidgets.QScrollArea(self.tab_2)
        self.scrollArea_13.setGeometry(QtCore.QRect(10, 10, 481, 381))
        self.scrollArea_13.setWidgetResizable(True)
        self.scrollArea_13.setObjectName("scrollArea_13")
        self.scrollAreaWidgetContents_15 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_15.setGeometry(QtCore.QRect(0, 0, 462, 500))
        self.scrollAreaWidgetContents_15.setMinimumSize(QtCore.QSize(0, 500))
        self.scrollAreaWidgetContents_15.setObjectName("scrollAreaWidgetContents_15")
        self.scrollArea_14 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_15)
        self.scrollArea_14.setGeometry(QtCore.QRect(30, 20, 421, 81))
        self.scrollArea_14.setWidgetResizable(True)
        self.scrollArea_14.setObjectName("scrollArea_14")
        self.scrollAreaWidgetContents_16 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_16.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_16.setObjectName("scrollAreaWidgetContents_16")
        self.label_32 = QtWidgets.QLabel(self.scrollAreaWidgetContents_16)
        self.label_32.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_32.setStyleSheet("border-image: url(:/新前缀/1684977876533.png);")
        self.label_32.setText("")
        self.label_32.setObjectName("label_32")
        self.label_33 = QtWidgets.QLabel(self.scrollAreaWidgetContents_16)
        self.label_33.setGeometry(QtCore.QRect(210, 20, 81, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_33.setFont(font)
        self.label_33.setObjectName("label_33")
        self.pushButton_24 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_16)
        self.pushButton_24.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_24.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_24.setText("")
        self.pushButton_24.setObjectName("pushButton_24")
        self.label_34 = QtWidgets.QLabel(self.scrollAreaWidgetContents_16)
        self.label_34.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_34.setObjectName("label_34")
        self.pushButton_25 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_16)
        self.pushButton_25.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_25.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_25.setText("")
        self.pushButton_25.setObjectName("pushButton_25")
        self.scrollArea_14.setWidget(self.scrollAreaWidgetContents_16)
        self.scrollArea_15 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_15)
        self.scrollArea_15.setGeometry(QtCore.QRect(30, 140, 421, 81))
        self.scrollArea_15.setWidgetResizable(True)
        self.scrollArea_15.setObjectName("scrollArea_15")
        self.scrollAreaWidgetContents_17 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_17.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_17.setObjectName("scrollAreaWidgetContents_17")
        self.label_35 = QtWidgets.QLabel(self.scrollAreaWidgetContents_17)
        self.label_35.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_35.setStyleSheet("border-image: url(:/新前缀/1684977933535.png);")
        self.label_35.setText("")
        self.label_35.setObjectName("label_35")
        self.label_36 = QtWidgets.QLabel(self.scrollAreaWidgetContents_17)
        self.label_36.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_36.setFont(font)
        self.label_36.setObjectName("label_36")
        self.pushButton_26 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_17)
        self.pushButton_26.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_26.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_26.setText("")
        self.pushButton_26.setObjectName("pushButton_26")
        self.label_37 = QtWidgets.QLabel(self.scrollAreaWidgetContents_17)
        self.label_37.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_37.setObjectName("label_37")
        self.pushButton_27 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_17)
        self.pushButton_27.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_27.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_27.setText("")
        self.pushButton_27.setObjectName("pushButton_27")
        self.scrollArea_15.setWidget(self.scrollAreaWidgetContents_17)
        self.scrollArea_16 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_15)
        self.scrollArea_16.setGeometry(QtCore.QRect(30, 260, 421, 81))
        self.scrollArea_16.setWidgetResizable(True)
        self.scrollArea_16.setObjectName("scrollArea_16")
        self.scrollAreaWidgetContents_18 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_18.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_18.setObjectName("scrollAreaWidgetContents_18")
        self.label_38 = QtWidgets.QLabel(self.scrollAreaWidgetContents_18)
        self.label_38.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_38.setStyleSheet("border-image: url(:/新前缀/1684977973655.png);")
        self.label_38.setText("")
        self.label_38.setObjectName("label_38")
        self.label_39 = QtWidgets.QLabel(self.scrollAreaWidgetContents_18)
        self.label_39.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_39.setFont(font)
        self.label_39.setObjectName("label_39")
        self.pushButton_28 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_18)
        self.pushButton_28.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_28.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_28.setText("")
        self.pushButton_28.setObjectName("pushButton_28")
        self.label_40 = QtWidgets.QLabel(self.scrollAreaWidgetContents_18)
        self.label_40.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_40.setObjectName("label_40")
        self.pushButton_29 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_18)
        self.pushButton_29.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_29.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_29.setText("")
        self.pushButton_29.setObjectName("pushButton_29")
        self.scrollArea_16.setWidget(self.scrollAreaWidgetContents_18)
        self.scrollArea_17 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_15)
        self.scrollArea_17.setGeometry(QtCore.QRect(30, 380, 421, 81))
        self.scrollArea_17.setWidgetResizable(True)
        self.scrollArea_17.setObjectName("scrollArea_17")
        self.scrollAreaWidgetContents_19 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_19.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_19.setObjectName("scrollAreaWidgetContents_19")
        self.label_41 = QtWidgets.QLabel(self.scrollAreaWidgetContents_19)
        self.label_41.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_41.setStyleSheet("border-image: url(:/新前缀/1684978053669.png);")
        self.label_41.setText("")
        self.label_41.setObjectName("label_41")
        self.label_42 = QtWidgets.QLabel(self.scrollAreaWidgetContents_19)
        self.label_42.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_42.setFont(font)
        self.label_42.setObjectName("label_42")
        self.pushButton_30 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_19)
        self.pushButton_30.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_30.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_30.setText("")
        self.pushButton_30.setObjectName("pushButton_30")
        self.pushButton_31 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_19)
        self.pushButton_31.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_31.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_31.setText("")
        self.pushButton_31.setObjectName("pushButton_31")
        self.scrollArea_17.setWidget(self.scrollAreaWidgetContents_19)
        self.scrollArea_23 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_15)
        self.scrollArea_23.setGeometry(QtCore.QRect(30, 1100, 421, 81))
        self.scrollArea_23.setWidgetResizable(True)
        self.scrollArea_23.setObjectName("scrollArea_23")
        self.scrollAreaWidgetContents_25 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_25.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_25.setObjectName("scrollAreaWidgetContents_25")
        self.label_53 = QtWidgets.QLabel(self.scrollAreaWidgetContents_25)
        self.label_53.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_53.setStyleSheet("border-image: url(:/新前缀/1684977055363.png);")
        self.label_53.setText("")
        self.label_53.setObjectName("label_53")
        self.label_54 = QtWidgets.QLabel(self.scrollAreaWidgetContents_25)
        self.label_54.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_54.setFont(font)
        self.label_54.setObjectName("label_54")
        self.pushButton_42 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_25)
        self.pushButton_42.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_42.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_42.setText("")
        self.pushButton_42.setObjectName("pushButton_42")
        self.pushButton_43 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_25)
        self.pushButton_43.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_43.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_43.setText("")
        self.pushButton_43.setObjectName("pushButton_43")
        self.scrollArea_23.setWidget(self.scrollAreaWidgetContents_25)
        self.scrollArea_13.setWidget(self.scrollAreaWidgetContents_15)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.scrollArea_18 = QtWidgets.QScrollArea(self.tab)
        self.scrollArea_18.setGeometry(QtCore.QRect(10, 10, 481, 381))
        self.scrollArea_18.setWidgetResizable(True)
        self.scrollArea_18.setObjectName("scrollArea_18")
        self.scrollAreaWidgetContents_20 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_20.setGeometry(QtCore.QRect(0, 0, 462, 500))
        self.scrollAreaWidgetContents_20.setMinimumSize(QtCore.QSize(0, 500))
        self.scrollAreaWidgetContents_20.setObjectName("scrollAreaWidgetContents_20")
        self.scrollArea_19 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_20)
        self.scrollArea_19.setGeometry(QtCore.QRect(30, 20, 421, 81))
        self.scrollArea_19.setWidgetResizable(True)
        self.scrollArea_19.setObjectName("scrollArea_19")
        self.scrollAreaWidgetContents_21 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_21.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_21.setObjectName("scrollAreaWidgetContents_21")
        self.label_43 = QtWidgets.QLabel(self.scrollAreaWidgetContents_21)
        self.label_43.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_43.setStyleSheet("border-image: url(:/新前缀/1684978225943.png);")
        self.label_43.setText("")
        self.label_43.setObjectName("label_43")
        self.label_44 = QtWidgets.QLabel(self.scrollAreaWidgetContents_21)
        self.label_44.setGeometry(QtCore.QRect(210, 20, 81, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_44.setFont(font)
        self.label_44.setObjectName("label_44")
        self.pushButton_32 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_21)
        self.pushButton_32.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_32.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_32.setText("")
        self.pushButton_32.setObjectName("pushButton_32")
        self.label_45 = QtWidgets.QLabel(self.scrollAreaWidgetContents_21)
        self.label_45.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_45.setObjectName("label_45")
        self.pushButton_33 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_21)
        self.pushButton_33.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_33.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_33.setText("")
        self.pushButton_33.setObjectName("pushButton_33")
        self.scrollArea_19.setWidget(self.scrollAreaWidgetContents_21)
        self.scrollArea_20 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_20)
        self.scrollArea_20.setGeometry(QtCore.QRect(30, 140, 421, 81))
        self.scrollArea_20.setWidgetResizable(True)
        self.scrollArea_20.setObjectName("scrollArea_20")
        self.scrollAreaWidgetContents_22 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_22.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_22.setObjectName("scrollAreaWidgetContents_22")
        self.label_46 = QtWidgets.QLabel(self.scrollAreaWidgetContents_22)
        self.label_46.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_46.setStyleSheet("border-image: url(:/新前缀/1684978276976.png);")
        self.label_46.setText("")
        self.label_46.setObjectName("label_46")
        self.label_47 = QtWidgets.QLabel(self.scrollAreaWidgetContents_22)
        self.label_47.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_47.setFont(font)
        self.label_47.setObjectName("label_47")
        self.pushButton_34 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_22)
        self.pushButton_34.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_34.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_34.setText("")
        self.pushButton_34.setObjectName("pushButton_34")
        self.label_48 = QtWidgets.QLabel(self.scrollAreaWidgetContents_22)
        self.label_48.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_48.setObjectName("label_48")
        self.pushButton_35 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_22)
        self.pushButton_35.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_35.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_35.setText("")
        self.pushButton_35.setObjectName("pushButton_35")
        self.scrollArea_20.setWidget(self.scrollAreaWidgetContents_22)
        self.scrollArea_21 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_20)
        self.scrollArea_21.setGeometry(QtCore.QRect(30, 260, 421, 81))
        self.scrollArea_21.setWidgetResizable(True)
        self.scrollArea_21.setObjectName("scrollArea_21")
        self.scrollAreaWidgetContents_23 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_23.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_23.setObjectName("scrollAreaWidgetContents_23")
        self.label_49 = QtWidgets.QLabel(self.scrollAreaWidgetContents_23)
        self.label_49.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_49.setStyleSheet("border-image: url(:/新前缀/1684978332490.png);")
        self.label_49.setText("")
        self.label_49.setObjectName("label_49")
        self.label_50 = QtWidgets.QLabel(self.scrollAreaWidgetContents_23)
        self.label_50.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_50.setFont(font)
        self.label_50.setObjectName("label_50")
        self.pushButton_36 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_23)
        self.pushButton_36.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_36.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_36.setText("")
        self.pushButton_36.setObjectName("pushButton_36")
        self.label_51 = QtWidgets.QLabel(self.scrollAreaWidgetContents_23)
        self.label_51.setGeometry(QtCore.QRect(230, 60, 54, 12))
        self.label_51.setObjectName("label_51")
        self.pushButton_37 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_23)
        self.pushButton_37.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_37.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_37.setText("")
        self.pushButton_37.setObjectName("pushButton_37")
        self.scrollArea_21.setWidget(self.scrollAreaWidgetContents_23)
        self.scrollArea_22 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_20)
        self.scrollArea_22.setGeometry(QtCore.QRect(30, 380, 421, 81))
        self.scrollArea_22.setWidgetResizable(True)
        self.scrollArea_22.setObjectName("scrollArea_22")
        self.scrollAreaWidgetContents_24 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_24.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_24.setObjectName("scrollAreaWidgetContents_24")
        self.label_52 = QtWidgets.QLabel(self.scrollAreaWidgetContents_24)
        self.label_52.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_52.setStyleSheet("border-image: url(:/新前缀/1684978053669.png);")
        self.label_52.setText("")
        self.label_52.setObjectName("label_52")
        self.label_55 = QtWidgets.QLabel(self.scrollAreaWidgetContents_24)
        self.label_55.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_55.setFont(font)
        self.label_55.setObjectName("label_55")
        self.pushButton_38 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_24)
        self.pushButton_38.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_38.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_38.setText("")
        self.pushButton_38.setObjectName("pushButton_38")
        self.pushButton_39 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_24)
        self.pushButton_39.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_39.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_39.setText("")
        self.pushButton_39.setObjectName("pushButton_39")
        self.scrollArea_22.setWidget(self.scrollAreaWidgetContents_24)
        self.scrollArea_24 = QtWidgets.QScrollArea(self.scrollAreaWidgetContents_20)
        self.scrollArea_24.setGeometry(QtCore.QRect(30, 1100, 421, 81))
        self.scrollArea_24.setWidgetResizable(True)
        self.scrollArea_24.setObjectName("scrollArea_24")
        self.scrollAreaWidgetContents_26 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_26.setGeometry(QtCore.QRect(0, 0, 419, 79))
        self.scrollAreaWidgetContents_26.setObjectName("scrollAreaWidgetContents_26")
        self.label_56 = QtWidgets.QLabel(self.scrollAreaWidgetContents_26)
        self.label_56.setGeometry(QtCore.QRect(0, 0, 181, 81))
        self.label_56.setStyleSheet("border-image: url(:/新前缀/1684977055363.png);")
        self.label_56.setText("")
        self.label_56.setObjectName("label_56")
        self.label_57 = QtWidgets.QLabel(self.scrollAreaWidgetContents_26)
        self.label_57.setGeometry(QtCore.QRect(210, 20, 131, 41))
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label_57.setFont(font)
        self.label_57.setObjectName("label_57")
        self.pushButton_44 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_26)
        self.pushButton_44.setGeometry(QtCore.QRect(320, 20, 41, 41))
        self.pushButton_44.setStyleSheet("border-image: url(:/新前缀/1684919348708.png);")
        self.pushButton_44.setText("")
        self.pushButton_44.setObjectName("pushButton_44")
        self.pushButton_45 = QtWidgets.QPushButton(self.scrollAreaWidgetContents_26)
        self.pushButton_45.setGeometry(QtCore.QRect(370, 20, 41, 41))
        self.pushButton_45.setStyleSheet("border-image: url(:/BACK/Desktop/img/help.jpg);")
        self.pushButton_45.setText("")
        self.pushButton_45.setObjectName("pushButton_45")
        self.scrollArea_24.setWidget(self.scrollAreaWidgetContents_26)
        self.scrollArea_18.setWidget(self.scrollAreaWidgetContents_20)
        self.tabWidget.addTab(self.tab, "")
        self.pushButton_40 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_40.setGeometry(QtCore.QRect(40, 520, 171, 51))
        self.pushButton_40.setStyleSheet("background-color: rgb(170, 170, 255);")
        self.pushButton_40.setObjectName("pushButton_40")
        self.pushButton_41 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_41.setGeometry(QtCore.QRect(280, 520, 171, 51))
        self.pushButton_41.setStyleSheet("background-color: rgb(170, 170, 255);")
        self.pushButton_41.setObjectName("pushButton_41")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 511, 23))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "PPN的小店"))
        self.label_2.setText(_translate("MainWindow", "Neng的小餐馆"))
        self.toolButton.setText(_translate("MainWindow", "收藏商家"))
        self.toolButton_2.setText(_translate("MainWindow", "联系商家"))
        self.label_6.setText(_translate("MainWindow", "红烧肉"))
        self.label_15.setText(_translate("MainWindow", "0.01¥"))
        self.label_8.setText(_translate("MainWindow", "清蒸鲈鱼"))
        self.label_16.setText(_translate("MainWindow", "0.01¥"))
        self.label_12.setText(_translate("MainWindow", "芋头扣肉"))
        self.label_17.setText(_translate("MainWindow", "0.01¥"))
        self.label_14.setText(_translate("MainWindow", "白灼虾"))
        self.label_21.setText(_translate("MainWindow", "孜然羊肉"))
        self.label_23.setText(_translate("MainWindow", "糖醋排骨"))
        self.label_25.setText(_translate("MainWindow", "可乐鸡翅"))
        self.label_27.setText(_translate("MainWindow", "鱼头汤"))
        self.label_29.setText(_translate("MainWindow", "咖喱牛肉"))
        self.label_31.setText(_translate("MainWindow", "孜然羊肉"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.Staple_food), _translate("MainWindow", "主食"))
        self.label_33.setText(_translate("MainWindow", "茶叶蛋"))
        self.label_34.setText(_translate("MainWindow", "0.01¥"))
        self.label_36.setText(_translate("MainWindow", "鸡爪爪"))
        self.label_37.setText(_translate("MainWindow", "0.01¥"))
        self.label_39.setText(_translate("MainWindow", "毛豆"))
        self.label_40.setText(_translate("MainWindow", "0.01¥"))
        self.label_42.setText(_translate("MainWindow", "盐水花生"))
        self.label_54.setText(_translate("MainWindow", "孜然羊肉"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "小吃"))
        self.label_44.setText(_translate("MainWindow", "柠檬茶"))
        self.label_45.setText(_translate("MainWindow", "0.01¥"))
        self.label_47.setText(_translate("MainWindow", "多肉葡萄"))
        self.label_48.setText(_translate("MainWindow", "0.01¥"))
        self.label_50.setText(_translate("MainWindow", "茶颜"))
        self.label_51.setText(_translate("MainWindow", "0.01¥"))
        self.label_55.setText(_translate("MainWindow", "盐水花生"))
        self.label_57.setText(_translate("MainWindow", "孜然羊肉"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "奶茶"))
        self.pushButton_40.setText(_translate("MainWindow", "购物车"))
        self.pushButton_41.setText(_translate("MainWindow", "结算"))

输出如下界面:

2.界面做好了,那么接下来就可以实现功能了:

先实现每个菜加入购物车的功能

把红烧肉加入购物车怎么做,一起来看代码:

(1)首先我们用xlrd库创建xls表格

self.workbook = xlwt.Workbook(encoding='utf-8',style_compression=0)
         
self.sheet = self.workbook.add_sheet('表格1', cell_overwrite_ok=False)
         
style = xlwt.XFStyle()

(2)点击加入购物车功能,实际上就是把对应的变量写入表格中 

def PushButton(self):
    self.sheet.write(0, 0, '红烧肉  +1')    ###红烧肉

    self.workbook.save('eat.xls')

    tkinter.messagebox.showinfo('添加','红烧肉  +1')

    return

(3)红烧肉的做法功能:用到了tk库的弹窗函数

def PushButton16(self):


tkinter.messagebox.showinfo('做法:','1、锅烧热,加少许油,油热后放入五花肉。\n 2、煸炒至五花肉变色,加入红烧酱油。\n 3、翻炒均匀,加入糖,炒至糖融化,且均匀包裹肉块。\n 4、将炒好的五花肉倒入炖锅,加水没过肉。 \n 5、大火烧开,放入葱、姜、八角和香叶,转小火炖半小时。\n 6、放入鹌鹑蛋,继续炖10分钟左右,大火收汁即可')

点击弹窗,显示做法如下图: 

 

3.这样我们来加入红烧肉,然后结算一下:

3.1.加购物车

3.2.结算

 

4.奶茶小吃栏功能都类似

    def PushButton9(self):
        self.sheet.write(0, 9, '茶叶蛋  +1')


        self.workbook.save('eat.xls')

        tkinter.messagebox.showinfo('添加','茶叶蛋  +1')

 上述代码添加茶叶蛋的功能。

界面右上角的联系商家按钮,也类似;

    def tubutton1(self):
        tkinter.messagebox.showinfo('完成','+86: 1314520')

5.结算输出用到xlwt库来实现:

excel1 = xlrd.open_workbook(r'eat.xls','utf-8',formatting_info=True)
###获取所有sheet名字
excel1.sheet_names()

###获取sheet数量
excel1.nsheets

###获取所有sheet对象
excel1.sheets()

###通过sheet名查找
sheet1 = excel1.sheet_by_name("表格1")

三.总结

可以根据个人喜好,添加各种东西,让你有吃啥纠结症的朋友挑选起来!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/567794.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

DMBOK知识梳理for CDGA/CDGP——第一章数据管理

关 注gzh“大数据食铁兽“,回复“知识点”获取《DMBOK知识梳理for CDGA/CDGP》常考知识点(第一章数据管理) 第一章 数据管理 第一章在 CDGA|CDGP考试中分值占比均不是很高,主要侧重点是考概念性的知识,理解数据管理的…

设计模式 -第1部分 避免浪费- 第1章 Flyweight 模式 - 共享对象避免浪费

第1部分 避免浪费 注:其内容主要来自于【日】-结城浩 著《图解设计模式》20章节 极力推荐大家阅读原著 第1章 Flyweight 模式 - 共享对象避免浪费 1.1 Flyweight 模式 Flyweight 的意思"轻量级",其在英文中的原意指比赛中选手体重最轻等级的一…

迪赛智慧数——饼图柱状图(基本饼图和基本柱状图):“怒路症”数据解读

效果图 35%的司机承认自己属于“路怒族”,还有65%的人表示自己不是“路怒族”。 近日,上海两车高架上斗气碰撞差点掉落高架,上海高架出现“史诗级”斗气车。小编在此呼吁大家,开车路上减压,避免坏情绪伴随&#xff0c…

DDoS攻击与防御(一)

前言 这章主要讲述DDoS攻击与防御方式 理论知识来源于 https://www.microsoft.com/zh-cn/security/business/security-101/what-is-a-ddos-attack 1:攻击 一般来说,DDoS 攻击分为三大类:容量耗尽攻击、协议攻击和资源层攻击。 1>容量耗尽…

shiro基于redis实现分布式权限管理,在加入shiro的缓存管理后,项目报错

shiro基于redis实现分布式权限管理,在加入shiro的缓存管理后,项目报错 报错信息概括解决其他详细报错信息 报错信息概括 2023-05-24 16:27:56.374 ERROR 28740 --- [nio-8092-exec-6] o.a.s.web.servlet.AbstractShiroFilter : session.touch() method …

水处理计算常用表格大全

第二章 设计方案城市污水处理厂的设计规模与进入处理厂的污水水质和水量有关,污水的水质和水量可以通过设计任务书的原始资料计算。2.1 厂址选择在污水处理厂设计中,选定厂址是一个重要的环节,处理广的位置对周围环境卫生、基建投资及运行管理…

加强密码安全,保护您的账户——ADSelfService Plus

在当今数字化时代,密码安全成为了每个人都需要关注的重要问题。随着越来越多的个人和组织依赖于互联网和电子系统进行业务和通信,确保账户的安全性变得尤为关键。在这方面,ADSelfService Plus是一个功能强大的解决方案,为用户提供…

版图设计工具解析-virtuoso的display.drf文件解析

1. display.drf文件解析 virtuoso的版图颜色定义分析 下图为virtuoso的版图颜色,包括填充,轮廓,彩点,线形 本文以smic18mmrf的display.drf文件进行解析 smic18的PDK包下存在display.drf文件 打开文件display.drf文件后看到如下…

ApiKit 简介安装以及如何使用

一、介绍 ApiKit 是接口管理、开发、测试全流程集成工具,定位 API 管理 Mock 自动化测试 异常监控 团队协作。 1、开发测试过程中的现状 yapi -- 管理接口文档 rap -- 前端开发mock数据 postman -- 开发调试接口、测试调用接口 jmeter -- 基本的压力测试 2…

1个普通Java程序员需要具备什么样的素质和能力才可以称得上高级工程师?

1个Java程序员具备什么样的素质和能力才可以称得上高级工程师? 这个问题也引发了我的一些思考,可能很多人会说,“作为高级工程师,基础得过硬、得熟练掌握一门编程语言、至少看过一个优秀开源项目的源代码、有过高并发/性能优化的…

【RocketMQ】RocketMQ入门

【RocketMQ】RocketMQ入门 文章目录 【RocketMQ】RocketMQ入门1. 消费模式2. 发送/消费 消息2.1 同步消息2.2 异步消息2.3 单向消息2.4 延迟消息2.5 批量消息2.6 顺序消息 1. 消费模式 MQ的消费模式大致分为两种,一种是推Push,一种是拉pull。 Push模式…

在变压器厂中使用 ISA-95 应用程序进行调度集成

介绍 在工业批量和连续生产/运营环境中,调度涉及将诸如罐、反应器和其他加工设备之类的资源分配给生产/运营任务。第 4 层生产/运营计划确定要制造什么产品、要制造多少产品以及何时制造。根据设备、物料、人员和班次的可用性,随着时间的推移分配资源。…

CSDN中如何获得铁粉(用心篇)

✅作者简介:2022年博客新星 第八。热爱国学的Java后端开发者,修心和技术同步精进。 🍎个人主页:Java Fans的博客 🍊个人信条:不迁怒,不贰过。小知识,大智慧。 💞当前专栏…

快速实现pytest自定义配置项,让Web自动化测试更便捷!

目录 前言: 一、什么是pytest.ini 二、在pytest.ini中添加自定义配置项 三、使用自定义配置项 四、结论 前言: WEB自动化测试是一个重要的环节,需要结合框架和工具进行开发。在WEB自动化测试中,常用的是pytest框架&#xff…

go sync包

官方文档:https://pkg.go.dev/sync 临界区 临界区(critical section)是指包含有共享数据的一段代码,这些代码可能被多个线程访问 或修改。临界区的存在就是为了保证当有一个线程在临界区内执行的时候,不能有其他任何线程被允许在临界区执行…

workquue

参考 讲解Linux内核工作队列workqueue源码分析 - 知乎 浅谈Linux内核中断下半部——工作队列(work queue) - 知乎 kernel/workqueue.c 初始化 /** 6004 * workqueue_init_early - early init for workqueue subsystem 6005 * 6006 * This is th…

字节测开5年经验之谈,1分钟了解自动化测试..

引子 写在最前面:目前自动化测试并不属于新鲜的事物,或者说自动化测试的各种方法论已经层出不穷,但是,能够明白自动化测试并很好落地实施的团队还不是非常多,我们接来下用通俗的方式来介绍自动化测试…… 本文共有2410…

WebSocket全双工通信SpringBoot实现

【IT老齐238】十分钟上手WebSocket全双工通信协议_哔哩哔哩_bilibili【IT老齐238】十分钟上手WebSocket全双工通信协议, 视频播放量 8348、弹幕量 23、点赞数 318、投硬币枚数 157、收藏人数 257、转发人数 30, 视频作者 IT老齐, 作者简介 老齐的个人V: itlaoqi001 ~~欢迎前来交…

kubernetes01

kubernetes基础 kubernetes介绍 Kubernetes是Google在2014年开源的一款容器集群系统,简称k8s Kubernetes用于容器化应用程序部署、扩展和管理,目标是让容器化应用简单高效 官方网站:https://kubernetes.io/ 官方文档:https://ku…

PFC(Priority Flow Control)及PFC Storm介绍

文章目录 PFCPFC Storm PFC PFC是一种流量控制机制,用于保证网络中的无损传输,常用于RDMA网络中,以下具体介绍其机制。 如图所示,发送方的出端口发送数据包给接收方的入端口。在发送方的出端口,数据包在至多八个队列中…