hrudhay
20th August 2008, 13:31
i created QListView to show my model content like this.
Play::Play( QWidget *parent, Qt::WFlags f )
: QWidget( parent, f )
{
QContentSet contentset;
contentset.addCriteria(QContentFilter::MimeType, "audio/*", QContentFilter::Or);
QContentSetModel model( &contentset );
listView= new QListView(this);
listView->setModel( &model );
vboxLayout = new QVBoxLayout(this);
vboxLayout->addWidget(listView);
this->setLayout(vboxLayout);
this->show();
}
i added some other components in the vboxLayout.
but the list is not showing any content, even model(QContentSetModel) had content.
Play::Play( QWidget *parent, Qt::WFlags f )
: QWidget( parent, f )
{
QContentSet contentset;
contentset.addCriteria(QContentFilter::MimeType, "audio/*", QContentFilter::Or);
QContentSetModel model( &contentset );
listView= new QListView(this);
listView->setModel( &model );
vboxLayout = new QVBoxLayout(this);
vboxLayout->addWidget(listView);
this->setLayout(vboxLayout);
this->show();
}
i added some other components in the vboxLayout.
but the list is not showing any content, even model(QContentSetModel) had content.