Results 1 to 4 of 4

Thread: Display video in a GUI

  1. #1
    Join Date
    Jan 2013
    Posts
    43
    Thanks
    27
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Display video in a GUI

    Hi,
    When creating a GUI Application with Qt Creator, what widget must i use do display the video?
    I have this code but how do i insert the "video" in the ui?


    Qt Code:
    1. ...
    2. media = new QMediaPlayer(this);
    3. video = new QVideoWidget(this);
    4. media->setVideoOutput(video);
    5. ...
    6. ...
    7. QUrl url(QFileInfo(nomeDoFicheiro).absoluteFilePath());
    8. media->setMedia(url);
    9. media->play();
    10. ...
    To copy to clipboard, switch view to plain text mode 
    Last edited by aguleo; 30th May 2013 at 13:25.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Display video in a GUI

    ? QVideoWidget behaves like a normal widget.

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

    aguleo (30th May 2013)

  4. #3
    Join Date
    Jan 2013
    Posts
    43
    Thanks
    27
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Display video in a GUI

    yes but ... how to insert it when usin QtDesigner?
    I have to create it and then add to the layout?!

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Display video in a GUI

    Hi, sorry for late response. You can insert a normal widget in Qt Designer and then promote it to QVideoWidget.

Similar Threads

  1. To Display Video Frames from webcam on QML
    By bts-007 in forum Newbie
    Replies: 7
    Last Post: 10th October 2013, 14:45
  2. Qt video display
    By ganeshgladish in forum Newbie
    Replies: 7
    Last Post: 6th February 2013, 18:42
  3. About display video on the mainwindow(IPCamera)
    By kenchan in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2012, 01:56
  4. how to display video at a certain time?
    By cic in forum Qt Programming
    Replies: 1
    Last Post: 17th November 2011, 13:01
  5. In which component can I display video?
    By punkypogo in forum Qt Programming
    Replies: 4
    Last Post: 16th July 2010, 17:40

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.