From kde-devel Sun Jun 08 12:51:34 2008 From: "koos vriezen" Date: Sun, 08 Jun 2008 12:51:34 +0000 To: kde-devel Subject: Re: A newbie question about QXEmbed Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=121292973812099 2008/6/8 Otávio Souza : > You didn't forget the QProcess::start(), you did it at if ( !mp->start() ) > > Try to show up the window first, than you start the mplayer process, you can > try to start another app, like kwrite ou anything else > > If this doesn't work, try to qDebug the QXEmbed winId, and do mplayer by > hand, copy and paste with the command Really, you don't need QXEmbed. Here is a minimalistic mplayer frontend: #include #include int main( int argc, char **argv ) { QApplication app( argc, argv ); QWidget *window = new QWidget; window->show(); window->setUpdatesEnabled( false ); //call this when you start the mplayer process qDebug( "Window id=%d", window->winId() ); app.exec(); return 0; } g++ -o qmplayer qmplayer.cpp -I/usr/share/qt3/include -lqt-mt run ./qmplayer and from another shell mplayer -wid moviefile > And now, try to see if mplayer is running > > Em Sáb, 2008-06-07 às 21:39 +0200, koos vriezen escreveu: > > 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. > > mplayer -wid option is for outputting video in an existing window, > where the X Window is passed with the wid option. > You assume however that mplayer creates a window that then needs to be > embedded. Which is wrong. > > Br. > Koos > >>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe >>> << > > -- > Otávio Souza > > * MSLC-SE > * Representante Fedora-SE > * Criador do KinuX Linux > * Promotor KDE > * lunatiKo > >>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe >>> << > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<