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. Layout management.
Qt 6.11 is out! See what's new in the release blog

Layout management.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • B Offline
    B Offline
    BinuJanardhanan
    wrote on last edited by
    #1

    I have one vertical layout. Which contains two horizontal layouts.This vertical layout is set to a widget and this widget is assigned to the central widget.Now I want to show the horizontal layouts which are in vertical layout as 40% and 60% division. That means, assume vl is vertical layout and hl1 and hl2 are the horizontal layout. I want to assign 60% of the area for hl1 and 40% of the area for hl2.
    How can do this one?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
      wrote on last edited by
      #2

      Did you try with Stretch factors ?
      vlyt.addLayout(h1,6)
      vlyt.addLayout(h2,4)

      This should work perfectly for your problem.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      https://www.pthinks.com

      B 1 Reply Last reply
      4
      • dheerendraD dheerendra

        Did you try with Stretch factors ?
        vlyt.addLayout(h1,6)
        vlyt.addLayout(h2,4)

        This should work perfectly for your problem.

        B Offline
        B Offline
        BinuJanardhanan
        wrote on last edited by
        #3

        @dheerendra I had tried with setstretch , but that is not working.
        But which you have given is working fine. Thanks

        1 Reply Last reply
        1
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
          wrote on last edited by
          #4

          cool. You can make this issue to 'resolved' now.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          https://www.pthinks.com

          1 Reply Last reply
          3

          • Login

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