Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved How to QVBoxLayout setFixedWidth

    Qt for Python
    3
    5
    134
    Loading More Posts
    • 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.
    • P
      Penguin Powered Apps last edited by

      Hello Guys

      I have a main layout comprising of 2 sub layouts leftlayout and rightlayout. They are both QVBoxLayouts and i would like to the widths to 30% for the laeftlayout and 70% for the rightlayout.

      Any suggestions or tips would be appreciated.

      Thanks

      Simon

      1 Reply Last reply Reply Quote 0
      • K
        khryleption last edited by

        Hi,
        Try with QSplitter and function QSplitter::setStretchFactor

        1 Reply Last reply Reply Quote 0
        • P
          Penguin Powered Apps last edited by

          Thanks i'll give it a go

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            Unless you want them to be movable, use the stretch factor parameter when adding your sub-layout to your main layout.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply Reply Quote 0
            • P
              Penguin Powered Apps @SGaist last edited by

              @SGaist Thanks i will give that a try

              1 Reply Last reply Reply Quote 0
              • First post
                Last post