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.
  • SavizS Offline
    SavizS Offline
    Saviz
    wrote on 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?

    JoeCFDJ 1 Reply Last reply
    0
    • jsulmJ jsulm

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

      SavizS Offline
      SavizS Offline
      Saviz
      wrote on 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
      • SavizS Saviz

        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?

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on 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.

        SavizS 1 Reply Last reply
        2
        • JoeCFDJ JoeCFD

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

          SavizS Offline
          SavizS Offline
          Saviz
          wrote on last edited by
          #3

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

          jsulmJ 1 Reply Last reply
          0
          • SavizS Saviz

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

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on 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

            SavizS 1 Reply Last reply
            1
            • jsulmJ jsulm

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

              SavizS Offline
              SavizS Offline
              Saviz
              wrote on 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
              • SavizS Saviz has marked this topic as solved on

              • Login

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