NickHugi / PyKotor

A Python library that can read and modify most file formats used by the game Knights of the Old Republic and its sequel.
GNU Lesser General Public License v3.0
11 stars 3 forks source link

Fix audioplayer close event #62

Closed th3w1zard1 closed 6 months ago

th3w1zard1 commented 6 months ago

for whatever reason Class AudioPlayer(QMainWindow): does not stop the player when closing the window. This is because closeEvent isn't called. I've tried hooking the destroyed signal to it but that doesn't call it either.

Since there doesn't seem to be a solution I'm just calling self.player.stop() whenever the hideEvent is called. It's a decent workaround although i think it also means that the player will close on minimizing.

th3w1zard1 commented 6 months ago

Worth mentioning the same problem is happening in the module designer. It's also possible the closeEvent calls perfectly normal in the frozen exe as I never use it.