2008/6/7 Robert Wood : > I'm trying to develop a little open source application to set-up and use > Hauppauge boxes on Linux. I'm using KDevelop and have got to the stage > where I can set-up the box and alter its settings just fine. However, > what I would now like to do is embed a small mplayer Window within my > application. > > It looks like QXEmbed is what I need to use, but no matter what I have > tried I cannot get it to work. Someone helped by showing me how to do it > qt4, but I'd really like to do it with the qt3 libraries as, AFAIK, most > distributions come with qt3 libraries and not qt4 for the moment. > > I have tried the following code (sorry for horrible formatting): > > QXEmbed *eframe = new QXEmbed(this); > eframe->setGeometry(0,0,1280,720); > eframe->show(); > QProcess *mp = new QProcess(eframe); > > mp->setArguments("/usr/bin/mplayer"); > mp->addArgument(QString("-wid ") + > QString::number(eframe->winId())); > mp->addArgument("/home/robertw/avocent.avi"); > > if (!mp->start()) > { > textLabel1->setText("The application has not started"); > } > eframe->setProtocol(QXEmbed::XEMBED); > > > Now, I think *maybe* I need something like the next line (I realise it's > not correct code): > > eframe->embed(mp->winId()); > > This doesn't work properly. You can see that eframe is being created > because it overwrites an existing button, but mplayer is just not > started. I have tried the same with konsole and the closest I could get > was to remove the line where it is passed the window ID of eframe and > then it would just run as a stand alone application. > > I am guessing that I am close to achieving what I need to do, but after > several days of trying am getting nowhere at all. > > Would anyone be able to advise? I really would be most grateful! > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > unsubscribe << > I think you're missing a QProcess::start() or equivalent, aren't you? -- Loïc Corbasson [loic.corbasson@gmail.com]