```python
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
Window_Icon = "C:/Users/86137/Pictures/Screenshots/屏幕截图_20221129_220920(1).png"
class Main_Window(QWidget):
def __init__(self):
super(Main_Window,self).__init__()
self.initUI()
def initUI(self):
self.resize(500,500)
self.setWindowTitle("我的人生")
self.setWindowIcon(QIcon(Window_Icon))
self.image = QPixmap ("D:\mL\封面及衔接界面\封面图片.jpg")
self.Banner = QLabel(self)
self.Banner.setPixmap(self.image)
self.Menu = QLabel(self.Banner)
self.Menu.resize(500,500)
self.Menu.move(10,6)
self.Easy_Button = QPushButton(self.Menu)
self.Easy_Button.setFixedSize(120,60)
self.Easy_Button.setText("日程活动")
self.Normal_Button = QPushButton(self.Menu)
self.Normal_Button.setFixedSize(120,60)
self.Normal_Button.setText("课表查询")
self.Hard_Button = QPushButton(self.Menu)
self.Hard_Button.setFixedSize(120,60)
self.Hard_Button.setText("我的状态")
self.grid_menu = QGridLayout(self.Menu)
self.Easy_Button.setGeometry(185,180,100,80)
self.Normal_Button.setGeometry(185,260,100,80)
self.Hard_Button.setGeometry(185,345,100,80)
def main():
app = QApplication(sys.argv)
Window =Main_Window ()
Window.show()
sys.exit(app.exec())
###### 我想实现点击课表查询按钮就调用课表查询py文件,跳出课表查询的窗口,但看了网上的一些实例还是不太懂;
编写相关按钮的槽函数
import os
@pyqtSlot()
def on_Normal_Button_clicked(self):
'''调用另一个py文件'''
os.system("Filename.py")