歌曲列表标识当前歌曲

This commit is contained in:
flykhan 2023-08-31 16:12:40 +08:00
parent bb93831252
commit effdecb2e7
1 changed files with 27 additions and 25 deletions

View File

@ -166,6 +166,7 @@ void MainWindow::playNextSong()
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
ui->song_list_widget->setCurrentRow(index);
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
}
@ -180,6 +181,7 @@ void MainWindow::playLastSong()
// int len = sprintf(changeSongBuf, "loadfile ./song/%s\n", vectorSong[index].c_str());
qDebug() << changeSongBuf << endl; // 控制台打印下一首歌的名字
// write(this->fifo_fd, changeSongBuf.toUtf8().toStdString().c_str(),changeSongBuf.toUtf8().toStdString().size());
ui->song_list_widget->setCurrentRow(index);
write(this->fifo_fd, changeSongBuf, len); // 将获取的下一首歌曲名写入到有名管道中
}