QVideoWidget full screen mode issue
-
wrote on 27 Feb 2023, 04:07 last edited by
I am trying to make QVideoWidget display in full screen mode.
The code wroks perfectly fine. However, the visuals are not creating my expected results.
Here is how my QVideoWidget looks normall:
Here is how it looks in full screen:
I want my QVideoWidget to take up the full screen in this mode, but it doesn't.
As far as I am aware when the setFullScreen(true) is called, a new window will be created. Could it be that the new window does not have a layout set to it? Or is there some other problem that I am not aware of?
-
@Saviz said in QVideoWidget full screen mode issue:
How can I save and apply the layout when I attempt to close it?
Well call https://doc.qt.io/qt-6/qlayout.html#addWidget on the layout where you want to add it.
-
I am trying to make QVideoWidget display in full screen mode.
The code wroks perfectly fine. However, the visuals are not creating my expected results.
Here is how my QVideoWidget looks normall:
Here is how it looks in full screen:
I want my QVideoWidget to take up the full screen in this mode, but it doesn't.
As far as I am aware when the setFullScreen(true) is called, a new window will be created. Could it be that the new window does not have a layout set to it? Or is there some other problem that I am not aware of?
-
@Saviz if your video widget is inside a layout of another widget. You need to set its parent to nullptr and then set its size to screen size. When the fullscreen mode is closed, you have to set it back to the layout.
-
@Saviz said in QVideoWidget full screen mode issue:
How can I save and apply the layout when I attempt to close it?
Well call https://doc.qt.io/qt-6/qlayout.html#addWidget on the layout where you want to add it.
-
@Saviz said in QVideoWidget full screen mode issue:
How can I save and apply the layout when I attempt to close it?
Well call https://doc.qt.io/qt-6/qlayout.html#addWidget on the layout where you want to add it.
-
5/5