Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Select and execute the MIDI files displayed on QListWidget in Qt
prom3792 last edited by
How to select and execute the MIDI files shown QListWidget in Qt so it can be played by a MIDI player?
I've made a MIDI file player, but can only play songs that are determined directly from the source code. My Source Code still can not select from the table shown by QListWidget.Here is the source code for QListWidget and the integration of midi player with a menu created with Qt.
@gbe::gbe(QWidget *parent) : QMainWindow(parent), ui(new Ui::gbe)
myPath.setFilter((QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot)); myPlaylist = myPath.entryList(); ui->listWidget->addItems(myPlaylist);}
process.start("/home/prom/QTGBE/gbe/midiplayer", QStringList() << "/home/prom/playlist/coldplay-magic.mid");
Please be specific in your answer i will appreciate that,thank you
Hi and welcome to devnet,
You can use QListWidget's currentItem method to retrieve the data you need to feed your QProcess.
Hope it helps