Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. How VLC implement the functionality of playing video in full screen mode ?

How VLC implement the functionality of playing video in full screen mode ?

Scheduled Pinned Locked Moved Language Bindings
2 Posts 2 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    How VLC implement the functionality of playing video in full screen mode ?
    when you double click the black rectangle ,VLC will play video in full screen mode ,
    then if I doubleclick again ,it should return back .
    http://www.freeimagehosting.net/st4su

    so how to implement this functionality ?
    for simplicity ,you can modify the following code to implement it ?thanks
    NOTE : showFullScreen()only affects windows

    @import sys
    from PyQt4 import QtGui, QtCore

    class Player(QtGui.QMainWindow):

    def __init__(self, master=None):
        QtGui.QMainWindow.__init__(self, master)
    
    
        self.createUI()
    
    
    def createUI(self):
        
        self.Widget = QtGui.QWidget(self)
        self.setCentralWidget(self.Widget)
    
    
        self.VideoFrame = QtGui.QFrame()
        self.Palette = self.VideoFrame.palette()
        self.Palette.setColor (QtGui.QPalette.Window,
                               QtGui.QColor(0,0,0))
        self.VideoFrame.setPalette(self.Palette)
        self.VideoFrame.setAutoFillBackground(True)
    
        self.PositionSlider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
        self.PositionSlider.setToolTip("Position")
        self.PositionSlider.setMaximum(1000)
    
    
        self.HButtonBox = QtGui.QHBoxLayout()
        self.PlayButton = QtGui.QPushButton("Play")
        self.HButtonBox.addWidget(self.PlayButton)
    
    
        self.StopButton = QtGui.QPushButton("Stop")
        self.HButtonBox.addWidget(self.StopButton)
    
    
        self.HButtonBox.addStretch(1)
        self.VolumeSlider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
        self.VolumeSlider.setMaximum(100)
        
        self.VolumeSlider.setToolTip("Volume")
        self.HButtonBox.addWidget(self.VolumeSlider)
    
        self.VBoxLayout = QtGui.QVBoxLayout()
        self.VBoxLayout.addWidget(self.VideoFrame)
        self.VBoxLayout.addWidget(self.PositionSlider)
        self.VBoxLayout.addLayout(self.HButtonBox)
    
        self.Widget.setLayout(self.VBoxLayout)
    

    if name == "main":
    QtGui.QApplication.setStyle('macintosh')
    app = QtGui.QApplication(sys.argv)
    MediaPlayer = Player()
    MediaPlayer.show()
    MediaPlayer.resize(640, 480)
    sys.exit(app.exec_())
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      Did you try the implementation provided "here":http://qt-project.org/forums/viewthread/23852/ as both the posts are same.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved