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. What is main widget in the context of QLayout::SizeConstraint?
Forum Updated to NodeBB v4.3 + New Features

What is main widget in the context of QLayout::SizeConstraint?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 425 Views 2 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.
  • F Offline
    F Offline
    fokhagyma
    wrote on last edited by
    #1

    The description of the QLayout::SizeConstraint (https://doc.qt.io/qt-6/qlayout.html#SizeConstraint-enum) says "main widget" but nowhere explains what main means. Is main widget the widget for which the layout is applied, or the biggest widget in the layout, or what?

    F 1 Reply Last reply
    0
    • F fokhagyma

      The description of the QLayout::SizeConstraint (https://doc.qt.io/qt-6/qlayout.html#SizeConstraint-enum) says "main widget" but nowhere explains what main means. Is main widget the widget for which the layout is applied, or the biggest widget in the layout, or what?

      F Offline
      F Offline
      fokhagyma
      wrote on last edited by
      #2

      For me it seems that main widget is the widget to which the layout is applied, is this true?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fokhagyma
        wrote on last edited by
        #3

        Is it so hard question that nobody knows the answer? I thought it is a question about a basic thing. Interesting.

        Pl45m4P 1 Reply Last reply
        0
        • F fokhagyma

          Is it so hard question that nobody knows the answer? I thought it is a question about a basic thing. Interesting.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @fokhagyma

          "Main widget" could mean the main widget area without additional things around it like borders (QFrame) or whatever... but I'm not 100% sure.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0
          • JonBJ Online
            JonBJ Online
            JonB
            wrote on last edited by
            #5

            I am not sure either :) A layout can, of course, have more than one child widget placed on it. But the layout is applied to the widget it is on. Maybe that is what they mean by "main".

            For now, ignore the wording, and test the behaviour!

            Christian EhrlicherC 1 Reply Last reply
            0
            • JonBJ JonB

              I am not sure either :) A layout can, of course, have more than one child widget placed on it. But the layout is applied to the widget it is on. Maybe that is what they mean by "main".

              For now, ignore the wording, and test the behaviour!

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I'm not sure why there is 'main' - maybe to emphasise that it does not affect the children of the widget.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1

              • Login

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