lamp
3rd November 2010, 18:14
Hi
how to access and conrol QLable by ObjectName?
My code
void MakeAndShow_Objects::AnimatedObj_Show(QString Animated_objname)
{
Animated_label = new QLabel(this);
Animated_label->setObjectName(Animated_objname);
movie = new QMovie(Animated_label);
movie->setObjectName(Animated_objname+"mv");
Animated_label->setGeometry(QString(ValuePostion_List[0]).toInt(),QString(ValuePostion_List[1]).toInt(),drawW,drawH);
movie->setFileName(rsource+"Multimedia_Objects/Pic"+All_List.value(Animated_objname));
Animated_label->setScaledContents(true);
Animated_label->setMovie(movie);
movie->start();
qDebug()<<"animated"<<Animated_label->objectName();
Animated_label->show();
}
using This code and return true
this->findChild<QLabel *>(Animated_objname)
After big search not found any useful think and unknown to close, hide or ... QLable by objectname !
how to access and conrol QLable by ObjectName?
My code
void MakeAndShow_Objects::AnimatedObj_Show(QString Animated_objname)
{
Animated_label = new QLabel(this);
Animated_label->setObjectName(Animated_objname);
movie = new QMovie(Animated_label);
movie->setObjectName(Animated_objname+"mv");
Animated_label->setGeometry(QString(ValuePostion_List[0]).toInt(),QString(ValuePostion_List[1]).toInt(),drawW,drawH);
movie->setFileName(rsource+"Multimedia_Objects/Pic"+All_List.value(Animated_objname));
Animated_label->setScaledContents(true);
Animated_label->setMovie(movie);
movie->start();
qDebug()<<"animated"<<Animated_label->objectName();
Animated_label->show();
}
using This code and return true
this->findChild<QLabel *>(Animated_objname)
After big search not found any useful think and unknown to close, hide or ... QLable by objectname !