#此代码设计借阅书籍的界面
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import qdarkstyle
from PyQt5.QtSql import *
import time
# 创建借阅图书的类
class borrowBookDialog(QDialog):
borrow_book_success_signal = pyqtSignal()
def __init__(self, StudentId):
super(borrowBookDialog, self).__init__()
self.studentId = StudentId
self.setUpUI()
self.setWindowModality(Qt.WindowModal)
self.setWindowTitle("借阅书籍")
def setUpUI(self):
BookCategory = ["哲学", "教育", "生物学", "社会科学", "政治",
"法律", "军事", "经济", "文化", "体育", "语言文字", "地理", "天文学", "医学卫生", "农业"]
self.resize(300, 400)
self.layout = QFormLayout()
# 将垂直布局放置到主窗口中
self.setLayout(self.layout)
# label控件
self.borrowStudentLabel = QLabel("借 阅 人:")
self.borrowStudentIdLabel = QLabel(self.studentId)
self.titleLabel = QLabel(" 借阅书籍")
self.bookNameLabel = QLabel("书 名:")
self.bookIdLabel = QLabel("书 号:")
self.authNameLabel = QLabel("作 者:")
self.categoryLabel = QLabel("分 类:")
self.publisherLabel = QLabel("出 版 社:")
self.publisherDateLabel = QLabel("出版日期:")
# button控件
self.borrowBookButton = QPushButton("确认借阅")
# lineEdit控件
self.bookNameEdit = QLineEdit()
self.bookIdEdit = QLineEdit()
self.authNameEdit = QLineEdit()
PYQT5开发图书管理系统(4)
最新推荐文章于 2024-06-14 10:30:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)