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. Set QVBoxLayout and QLabel in full size in main window without spacing or border

Set QVBoxLayout and QLabel in full size in main window without spacing or border

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    CubeEd
    wrote on last edited by
    #1

    Hi everyone I am making media player and have QLabel in wich will be displaying video and that label inserted in QVBoxLayout. QVBoxLayout not in full size and it have spaces between QVBoxLayout and edge of main window.I want that it will be like for example in VLC media player.How it looks like now

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome to the forums

      Its the layouts default content margin
      Layout->setContentsMargins(0,0,0,0);
      and can also be done in Designer

      alt text

      C 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi and welcome to the forums

        Its the layouts default content margin
        Layout->setContentsMargins(0,0,0,0);
        and can also be done in Designer

        alt text

        C Offline
        C Offline
        CubeEd
        wrote on last edited by
        #3

        @mrjj Thanks but they are already all set to zero and heve that space which I pointed in screenshot

        mrjjM 1 Reply Last reply
        0
        • C CubeEd

          @mrjj Thanks but they are already all set to zero and heve that space which I pointed in screenshot

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @CubeEd
          Ok
          Even the first picture of the form, has margins.
          you set to zero in code ?

          C 1 Reply Last reply
          0
          • mrjjM mrjj

            @CubeEd
            Ok
            Even the first picture of the form, has margins.
            you set to zero in code ?

            C Offline
            C Offline
            CubeEd
            wrote on last edited by CubeEd
            #5

            @mrjj Thanks that was answer you helped me.I also I had to set margins to zero in QGridLayout

            mrjjM 1 Reply Last reply
            1
            • C CubeEd

              @mrjj Thanks that was answer you helped me.I also I had to set margins to zero in QGridLayout

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @CubeEd
              ok super
              so it was a margin somewhere?

              C 1 Reply Last reply
              1
              • mrjjM mrjj

                @CubeEd
                ok super
                so it was a margin somewhere?

                C Offline
                C Offline
                CubeEd
                wrote on last edited by CubeEd
                #7

                @mrjj Yes in QGridLayout 0_1551632018829_Screenshot from 2019-03-03 18-40-14.png

                1 Reply Last reply
                2

                • Login

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