Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Anchoring to Window

    General and Desktop
    2
    4
    1974
    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.
    • O
      OnyxDragun last edited by

      How do I take a control say... a splitter and anchor it to the sides of the window?

      So when I resize the window, the items that are in the splitter.. resize accordingly?

      I see sizePolicy, minimumSize, maximumSize and geometry but not sure which one it is I should be looking at.

      1 Reply Last reply Reply Quote 0
      • M
        msx_br last edited by

        Please explain with more datails.

        msx_br - Brazil (Netherlands)

        1 Reply Last reply Reply Quote 0
        • O
          OnyxDragun last edited by

          I have a QTextEdit with a QLineEdit within a Splitter.

          I want both QTextEdit and QLineEdit to span the width of the client window even if the window is resized.

          1 Reply Last reply Reply Quote 0
          • O
            OnyxDragun last edited by

            Ah figured it out.

            With MainWindow.ui
            Right-click on the main window
            Select Layout
            I chose 'Lay out in Grid'

            This anchored my splitter to all 4 corners so when i resize the window, the QTextEdit and QLineEdit resize properly too!

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