hi,
i downloaded qplay application form http://www.qtopia.net/modules/mydown...wcat.php?cid=2
it conations code
void QPlay::init()
{
QContentSet rtones;
rtones.addCriteria(QContentSet::Location, Qtopia::qtopiaDir() + "etc/SystemRingTones");
rtones.addCriteria(QContentSet::Location, "/mnt/sd");
rtones.
addCriteria(QContentSet
::Location,
QDir::homePath() );
rtones.addCriteria(QContentSet::MimeType, "audio/*");
QContentSetModel model(&rtones);
for(int i = 0; i < model.rowCount(); i++) {
const QContent &dl = model.content(i);
if (dl.fileKnown()) {
list << fi.fileName() << dl.file();
}
}
}
void QPlay::init()
{
QContentSet rtones;
rtones.addCriteria(QContentSet::Location, Qtopia::qtopiaDir() + "etc/SystemRingTones");
rtones.addCriteria(QContentSet::Location, "/mnt/sd");
rtones.addCriteria(QContentSet::Location, QDir::homePath() );
rtones.addCriteria(QContentSet::MimeType, "audio/*");
QContentSetModel model(&rtones);
for(int i = 0; i < model.rowCount(); i++) {
const QContent &dl = model.content(i);
if (dl.fileKnown()) {
QFileInfo fi(dl.file());
QStringList list;
list << fi.fileName() << dl.file();
new QTreeWidgetItem( treeWidget, list);
}
}
}
To copy to clipboard, switch view to plain text mode
QContentSet::Location not present in the qtopia library(QContentSet)..
i commented below three lines....
1. rtones.addCriteria(QContentSet::Location, Qtopia::qtopiaDir() + "etc/SystemRingTones");
2. rtones.addCriteria(QContentSet::Location, "/mnt/sd");
3. rtones.addCriteria(QContentSet::Location, QDir::homePath() );
Not it working fine....
it showing 2 files only...
how to specify the file path so that i can get more files from my specified directory path. or how to access files from specific path using QContentSet.
Hrudhay
Bookmarks