Results 1 to 9 of 9

Thread: Phonon::videoplayer doubt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    16
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows
    Thanks
    3

    Default Re: Phonon::videoplayer doubt

    Inside the Nextwindow , iam creating another instance of Videoplayerclass inside the button click


    Qt Code:
    1. void Nextwindow ::on_button_clicked()
    2. {
    3. Videoplayerclass *other = new Videoplayerclass ;
    4. other->show();
    5. this->hide();
    6. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Phonon::videoplayer doubt

    There is a memory leak, you should be doing like this

    Qt Code:
    1. void Videoplayerclass::on_pic1_clicked()
    2. {
    3. videoplayer->stop();
    4. videoplayer->hide();
    5. videoplayer->deleteLater();
    6.  
    7. Nextwindow *n = new Nextwindow;
    8. n->show();
    9.  
    10. this->hide();
    11. this->deleteLater();
    12. }
    13.  
    14. void Nextwindow::on_button_clicked()
    15. {
    16. Videoplayerclass *other = new Videoplayerclass;
    17. other->show();
    18.  
    19. this->hide();
    20. this->deleteLater();
    21. }
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Santosh Reddy for this useful post:

    vishnu717 (23rd June 2011)

Similar Threads

  1. Phonon::VideoPlayer
    By dano_labrosse in forum Newbie
    Replies: 6
    Last Post: 1st February 2012, 06:33
  2. Problem in phonon videoplayer
    By vinayaka in forum Newbie
    Replies: 1
    Last Post: 20th January 2012, 11:55
  3. How to set a background in a Phonon VideoPlayer ?
    By slimIT in forum Qt Programming
    Replies: 1
    Last Post: 24th October 2010, 21:54
  4. phonon VideoPlayer refresh
    By rbp in forum Qt Programming
    Replies: 6
    Last Post: 14th November 2008, 01:56
  5. phonon VideoPlayer seek
    By rbp in forum Qt Programming
    Replies: 4
    Last Post: 31st October 2008, 04:53

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.