Hi everyone,
Is this possible?
Im trying:
Qt Code:
bool MainWindow::on_checkBox_clicked() { QMediaPlaylist *playlist = new QMediaPlaylist(this); playlist->setPlaybackMode(QMediaPlaylist::Loop); playlist->setCurrentIndex(1); QMediaPlayer *player = new QMediaPlayer(this); player->setPlaylist(playlist); player->setVolume(100); if(this->ui->checkBox_2->isChecked() == false) { if(alarmTime == currentTime) { player->play(); } } else if(this->ui->checkBox_2->isChecked() == true) { playlist->stop(); } }To copy to clipboard, switch view to plain text mode
It starts playing fine, but when I click the appropriate check box to stop it, it does not. Any thoughts on how I can get this to work properly?
Thank you!!!
Bookmarks