from tkinter import *
from PyQt5 import*
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication
import sys
class Interface:
def interface(self):
self.Interface = Tk()
self.Interface.geometry('200x150')
btn = Button(self.Interface,text='show ui', command= self.show_ui).pack(expand=True)
self.Interface.mainloop()
def show_ui(self):
self.Interface.destroy()
Entries().ui_entries
class Entries:
def __init__(self):
app = QApplication(sys.argv)
self.ui_entries = uic.loadUi('Entrie.ui')
self.ui_entries.show()
# close me
self.ui_entries.btn_exit.clicked.connect(self.show_interface)
sys.exit(app.exec_())
def show_interface(self):
self.ui_entries.close()
Interface().interface()
if __name__=="__main__":
Interface().interface()
Подробнее здесь: https://stackoverflow.com/questions/793 ... om-tkinter
Открытое окно, созданное дизайнером qt из tkinter [закрыто] ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение