Extreme long shot, but… In a python script utilising PySide6 (QT6 library), why,...

@david@theblower.au

Extreme long shot, but…

In a python script utilising PySide6 (QT6 library), why, if you have a large method, does calling it cause the interface to hang until it is finished.

NB: making a smaller method that makes interface changes, then calls the larger method, doesn’t work either, none of the interface changes happen before it hangs.

I have an MainWindow class bases on QMainWindow

inside I have a QPushButton called runBtn

I have a handler:
self.runBtn.clicked.connect(self.buttonHandler)

def buttonHandler(self, s):
self.runBtn.setText("Running...")
self.runBtn.setEnabled(False)
self.makeSlides(True)

The setText and setEnabled methods don’t do anything before the interface hangs. But if I comment out makeSlides, it does.