PYQT和Python的接口之间的导航
我想在表格之间导航:当我单击按钮转到新接口时,当前一个会自动关闭(如果我在“登录”界面中,我单击一个按钮以转到“注册”我希望“登录”以关闭),但是我遇到的问题是该功能似乎不起作用:两个接口仍然打开。
def openwindow(self):
self.nextui = QtWidgets.QWidget()
self.ui = login.Ui_Login_Dialog()
self.ui.setupUi(self.nextui)
self.nextui.show()
我尝试将mainwndow.hide()
添加到代码似乎没有用:添加mainwndow.hide()
是:
Error! Error due to 'Ui_Login_Dialog' object has no attribute 'hide'
I want to navigate between forms: when I click on a button to go to a new interface, the current one closes automatically (if I am in the "Sign In" interface and I clicked on a button to go to the "Sign up" I want the "Sign In" in to close), but the problem I face is that the function does not seem to work: both the interfaces are still open.
def openwindow(self):
self.nextui = QtWidgets.QWidget()
self.ui = login.Ui_Login_Dialog()
self.ui.setupUi(self.nextui)
self.nextui.show()
I tried to add MainWndow.hide()
to the code but the function does not seem to work: the error I got when I added MainWndow.hide()
is:
Error! Error due to 'Ui_Login_Dialog' object has no attribute 'hide'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论