Pyinstaller and PyQt5 macOS Mojave compatibility issues

后端 未结 1 766
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-24 08:34

My application, created with Pyinstaller, worked fine until I upgraded from High Sierra to Mojave. In order to demonstrate the issue I create the simple application. Main windo

1条回答
  •  走了就别回头了
    2021-01-24 08:51

    I found an answer to my question. In order to solve this rendering issue you need to add the following line for a ui element, which needs to be updated. In my case it is required only if I need to run this application on macOS Mojave.

    .repaint()

    For example:

    def click(self):             
            self.pushButton.setEnabled(False)
            self.pushButton.setText("Button is clicked...")
            self.pushButton.repaint()
    

    0 讨论(0)
提交回复
热议问题