From 1a95171bb082016c85f8a2ffb19f7f2b5e6b82be Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Tue, 11 Jul 2023 16:24:53 +0200 Subject: [PATCH] Set volumeHorizontalSlider position on init --- openfm_qt/mainwindow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openfm_qt/mainwindow.py b/openfm_qt/mainwindow.py index d4de826..e655b51 100644 --- a/openfm_qt/mainwindow.py +++ b/openfm_qt/mainwindow.py @@ -27,9 +27,11 @@ class MainWindow(QMainWindow): self.__player = QMediaPlayer() self.__audio = QAudioOutput() self.__player.setAudioOutput(self.__audio) - self.setVolume(DEFAULT_VOLUME) self.printGroups() + self.setVolume(DEFAULT_VOLUME) + self.ui.volumeHorizontalSlider.setValue(DEFAULT_VOLUME) + self.ui.groupsListWidget.itemClicked.connect(self.printStations) self.ui.stationsListWidget.itemClicked.connect(self.playRadio) self.ui.playbackToolButton.clicked.connect(self.togglePlayer)