|
|
@ -911,8 +911,9 @@ UBTeacherBarPreviewMedia::UBTeacherBarPreviewMedia(QWidget* parent, const char* |
|
|
|
{ |
|
|
|
{ |
|
|
|
setObjectName(name); |
|
|
|
setObjectName(name); |
|
|
|
mWidget = new UBWidgetList(parent); |
|
|
|
mWidget = new UBWidgetList(parent); |
|
|
|
mWidget->setEmptyText(tr("No media found")); |
|
|
|
// mWidget->setEmptyText(tr("No media found"));
|
|
|
|
mLayout.addWidget(mWidget); |
|
|
|
mLayout.addWidget(mWidget); |
|
|
|
|
|
|
|
mWidget->setStyleSheet(QString("background-color: red;")); |
|
|
|
setLayout(&mLayout); |
|
|
|
setLayout(&mLayout); |
|
|
|
mWidgetList.clear(); |
|
|
|
mWidgetList.clear(); |
|
|
|
} |
|
|
|
} |
|
|
@ -929,9 +930,12 @@ UBTeacherBarPreviewMedia::~UBTeacherBarPreviewMedia() |
|
|
|
void UBTeacherBarPreviewMedia::cleanMedia() |
|
|
|
void UBTeacherBarPreviewMedia::cleanMedia() |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach(QWidget* eachWidget, mWidgetList.keys()){ |
|
|
|
foreach(QWidget* eachWidget, mWidgetList.keys()){ |
|
|
|
|
|
|
|
if(QString(eachWidget->metaObject()->className()).contains("UBDraggable")){ |
|
|
|
delete eachWidget; |
|
|
|
delete eachWidget; |
|
|
|
eachWidget = NULL; |
|
|
|
eachWidget = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
mWidget->removeWidget(eachWidget); |
|
|
|
|
|
|
|
} |
|
|
|
mWidgetList.clear(); |
|
|
|
mWidgetList.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|