Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QVideoWidget full screen mode issue
QtWS25 Last Chance

QVideoWidget full screen mode issue

Scheduled Pinned Locked Moved Solved General and Desktop
qvideowidgetfullscreen
5 Posts 3 Posters 464 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.
  • S Offline
    S Offline
    Saviz
    wrote on 27 Feb 2023, 04:07 last edited by
    #1

    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:
    e20f1917-aa34-4fb9-9e4f-4cb204a72284-image.png

    Here is how it looks in full screen:
    46949989-212c-437f-b242-cf51904074fe-image.png

    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?

    J 1 Reply Last reply 27 Feb 2023, 04:12
    0
    • J jsulm
      27 Feb 2023, 06:23

      @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.

      S Offline
      S Offline
      Saviz
      wrote on 27 Feb 2023, 06:41 last edited by
      #5

      @jsulm Okay. I am truly sorry for this, but apparently what I was looking for was showMaximized(). Thank you for the help.

      1 Reply Last reply
      0
      • S Saviz
        27 Feb 2023, 04:07

        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:
        e20f1917-aa34-4fb9-9e4f-4cb204a72284-image.png

        Here is how it looks in full screen:
        46949989-212c-437f-b242-cf51904074fe-image.png

        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?

        J Offline
        J Offline
        JoeCFD
        wrote on 27 Feb 2023, 04:12 last edited by JoeCFD
        #2

        @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.

        S 1 Reply Last reply 27 Feb 2023, 06:05
        2
        • J JoeCFD
          27 Feb 2023, 04:12

          @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.

          S Offline
          S Offline
          Saviz
          wrote on 27 Feb 2023, 06:05 last edited by
          #3

          @JoeCFD How can I save and apply the layout when I attempt to close it?

          J 1 Reply Last reply 27 Feb 2023, 06:23
          0
          • S Saviz
            27 Feb 2023, 06:05

            @JoeCFD How can I save and apply the layout when I attempt to close it?

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 27 Feb 2023, 06:23 last edited by
            #4

            @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.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply 27 Feb 2023, 06:41
            1
            • J jsulm
              27 Feb 2023, 06:23

              @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.

              S Offline
              S Offline
              Saviz
              wrote on 27 Feb 2023, 06:41 last edited by
              #5

              @jsulm Okay. I am truly sorry for this, but apparently what I was looking for was showMaximized(). Thank you for the help.

              1 Reply Last reply
              0
              • S Saviz has marked this topic as solved on 27 Feb 2023, 06:41

              1/5

              27 Feb 2023, 04:07

              • Login

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