Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to hide a window in the constructor?
- I wanna hide a window at once it creates. It works only if I do this with the help of button or something.
- class Example(QWidget):
- def __init__(self, parent=None):
- super(Example, self).__init__(parent)
- self.hide() # doesn't work
- self.btn = QPushButton('Hide', self)
- self.btn.clicked.connect(self.click) # works
- self.btn.show()
- def click(self): # works
- self.hide()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement