import os
import sys
from PyQt5.QtWidgets import *
from PyQt5.uic import loadUi
from PyQt5.QtGui import *
from pytube import YouTube
import threading
class Menu(QMainWindow):
def __init__(self):
super(Menu, self).__init__()
loadUi("un1.ui", self)
self.pb1.clicked.connect(self.next)
def next(self):
# Не знаю как написать тут вызов
# Next().show() не работает
class Next(QMainWindow):
def __init__(self):
super(Next, self).__init__()
loadUi("un2.ui", self)
self.pb2.clicked.connect(self.pp)
def pp(self):
print(1)
if __name__ == '__main__':
app = QApplication(sys.argv)
mainWindow = Menu()
mainWindow.show()
sys.exit(app.exec_())
def __init__(self):
super(Menu, self).__init__()
loadUi("un1.ui", self)
self.pb1.clicked.connect(self.next)
nextWindow = Next()
def next(self):
nextWindow.show()