我在同一个窗口中创建了 2 个框架,其中包含一些属性。现在可以单独调用它或可以同时显示from PyQt4 import QtCore, QtGuiimport timetry: _fromUtf8 = QtCore.QString.fromUtf8except AttributeError: def _fromUtf8(s): return stry: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig, _encoding)except AttributeError: def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, disambig)class Ui_Dialog(object): def frame1(self,Dialog): self.frame = QtGui.QFrame(Dialog) self.frame.setGeometry(QtCore.QRect(40, 20, 311, 391)) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.label = QtGui.QLabel(self.frame) self.label.setGeometry(QtCore.QRect(120, 180, 72, 23)) self.label.setObjectName(_fromUtf8("label")) self.label.setText(_translate("Dialog", "omniOS", None)) def frame2(self,Dialog): self.frame_2 = QtGui.QFrame(Dialog) self.frame_2.setGeometry(QtCore.QRect(30, 30, 311, 391)) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.label_2 = QtGui.QLabel(self.frame_2) self.label_2.setGeometry(QtCore.QRect(50, 230, 72, 31)) self.label_2.setObjectName(_fromUtf8("label_2")) self.lineEdit = QtGui.QLineEdit(self.frame_2) self.lineEdit.setGeometry(QtCore.QRect(150, 230, 113, 33)) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.label_2.setText(_translate("Dialog", "Login", None))我需要做的是,我需要在 3 秒后获取第一个窗口我需要获取第二个窗口 + 隐藏第一个窗口而不重叠它 self.frame1(Dialog) # call this when the program start self.frame2(Dialog) # call this after 3 second self.frame1(Dialog) 任何帮助将不胜感激 谢谢
添加回答
举报
0/150
提交
取消