Deepak Mishra
30th October 2007, 05:36
Hi to all
I am trying to play a movie in a widget. Code i am using is following
void uploadContents::previewOnDoubleClickSource()
{
if(x11!=0)
{
myProcess->kill();
}
if(x13==1)
DeleteScroller();
Q3ListViewItemIterator it(sourceListView);
for(;it.current();++it)
{
if(it.current()->isSelected())
{
for(QStringList::Iterator it1=listOfFiles.begin();it1!=listOfFiles.end();++i t1)
{
QString file=*it1;
if(QString::compare(file.section("/" ,-1,-1),it.current()->text(0))==0)
{
QWidget *wd=new QWidget;
wd->setMinimumSize(QSize(646, 512));
QString program = "mplayer";
QStringList arguments;
arguments << "-slave" << "-wid" << QString::number(wd->winId()) << "-fs" <<file ;
myProcess = new QProcess(wd);
myProcess->start(program, arguments);
x11=1;
// wd->activateWindow();
// wd->raise();
break;
}
}
}
}
}
I want movie to be played at front but it is playing at back.
When i am creating the widget making this as parent the the parent windows automatically get closed or it plays in the same window i could not understand it.
Plz help me
Thanking you all
I am trying to play a movie in a widget. Code i am using is following
void uploadContents::previewOnDoubleClickSource()
{
if(x11!=0)
{
myProcess->kill();
}
if(x13==1)
DeleteScroller();
Q3ListViewItemIterator it(sourceListView);
for(;it.current();++it)
{
if(it.current()->isSelected())
{
for(QStringList::Iterator it1=listOfFiles.begin();it1!=listOfFiles.end();++i t1)
{
QString file=*it1;
if(QString::compare(file.section("/" ,-1,-1),it.current()->text(0))==0)
{
QWidget *wd=new QWidget;
wd->setMinimumSize(QSize(646, 512));
QString program = "mplayer";
QStringList arguments;
arguments << "-slave" << "-wid" << QString::number(wd->winId()) << "-fs" <<file ;
myProcess = new QProcess(wd);
myProcess->start(program, arguments);
x11=1;
// wd->activateWindow();
// wd->raise();
break;
}
}
}
}
}
I want movie to be played at front but it is playing at back.
When i am creating the widget making this as parent the the parent windows automatically get closed or it plays in the same window i could not understand it.
Plz help me
Thanking you all