How do I open sub window after I click on button on main screen in PyQt4

后端 未结 3 1563
你的背包
你的背包 2020-12-10 09:23

HI I am trying to make a simple converter. I have used PyQt4 designed to make the Gui I want to know how launch a new window after I click on the individual button.

3条回答
  •  青春惊慌失措
    2020-12-10 09:27

    Make two programs: main_win.py and second_win.py, then in main_win.py put this lines:

    from os import system as sh               //In the begin
    
    def openewin(self):                       //In the class main_win
        sh("python second_win.py") 
    

    Ready, just connect the push button to function openewin!

提交回复
热议问题