i was wondering how to set a phonon player to full screen?
im trying this codes.
if not self.ui.videoPlayer.isFullScreen():
self.ui.videoPlayer.enterFullScreen()
else:
self.ui.videoPlayer.exitFullScreen()
but i keep on getting this error message
TypeError: ‘sip.methoddescriptor’ object is not callable
the code above works is from a sample project. the original code was
def full(self):
if not self.videoWidget.isFullScreen():
self.videoWidget.enterFullScreen()
else:
self.videoWidget.exitFullScreen()
im recreating it in PyQT and it seems hard for me.
can anyone please guide me on what im missing(having a hunch about it)
or what im doing wrong?
A VideoPlayer is not the same thing as a VideoWidget.
VideoPlayeris a subclass ofQWidget, so it will have anisFullScreenmethod – but it won’t have the methodsenterFullScreenandexitFullScreen, which belong to theVideoWidgetclass.However, the
VideoPlayerclass has a videoWidget method which returns the instance of the video widget it uses, so your code example should probably be changed to:EDIT
To provide a method for exiting fullscreen mode, set up a keyboard shortcut: