Joe Doe
Joe Doe

Reputation: 25

PyQt open another window

I showed another window to the user when he clicks 'Go to work' and hide current window. But when I hide current window, there's no application icon in the taskbar. How can I do what I want? I want to show new window and hide current, but the icon in the taskbar is not showing.

def start(self):
        window = MainWindow(self)
        window.show()
        self.hide()

Upvotes: 1

Views: 165

Answers (1)

Liron Lavi
Liron Lavi

Reputation: 431

Switch between self.hide() and self.showMinimized()

def start(self):
    window = MainWindow(self)
    window.show()
    self.showMinimized()

Upvotes: 1

Related Questions