Results 1 to 3 of 3

Thread: Play a movie in a widget

  1. #1

    Default Play a movie in a widget

    Hi to all
    I am trying to play a movie in a widget. Code i am using is following


    Qt Code:
    1. void uploadContents::previewOnDoubleClickSource()
    2. {
    3.  
    4. if(x11!=0)
    5. {
    6. myProcess->kill();
    7.  
    8. }
    9.  
    10. if(x13==1)
    11. DeleteScroller();
    12. Q3ListViewItemIterator it(sourceListView);
    13. for(;it.current();++it)
    14. {
    15.  
    16. if(it.current()->isSelected())
    17. {
    18.  
    19. for(QStringList::Iterator it1=listOfFiles.begin();it1!=listOfFiles.end();++it1)
    20. {
    21. QString file=*it1;
    22. if(QString::compare(file.section("/" ,-1,-1),it.current()->text(0))==0)
    23. {
    24. QWidget *wd=new QWidget;
    25. wd->setMinimumSize(QSize(646, 512));
    26. QString program = "mplayer";
    27. QStringList arguments;
    28. arguments << "-slave" << "-wid" << QString::number(wd->winId()) << "-fs" <<file ;
    29.  
    30. myProcess = new QProcess(wd);
    31. myProcess->start(program, arguments);
    32.  
    33. x11=1;
    34. // wd->activateWindow();
    35. // wd->raise();
    36.  
    37. break;
    38. }
    39.  
    40. }
    41.  
    42. }
    43.  
    44. }
    45. }
    To copy to clipboard, switch view to plain text mode 


    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
    Last edited by wysota; 30th October 2007 at 08:23. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Play a movie in a widget

    Did you call wd->show() anywhere?

  3. #3

    Default Re: Play a movie in a widget

    Quote Originally Posted by wysota View Post
    Did you call wd->show() anywhere?
    I have used wd->show() but still it's not working. Movie plays but at back(means before a parent widget}. I want it to be played at front.

Similar Threads

  1. [MAC] Quicktime Widget
    By dlpnet in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2008, 11:30
  2. Replies: 3
    Last Post: 17th October 2007, 12:52
  3. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  4. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.