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. Anchoring to Window
QtWS25 Last Chance

Anchoring to Window

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

    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
    0
    • M Offline
      M Offline
      msx_br
      wrote on last edited by
      #2

      Please explain with more datails.

      msx_br - Brazil (Netherlands)

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OnyxDragun
        wrote on last edited by
        #3

        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
        0
        • O Offline
          O Offline
          OnyxDragun
          wrote on last edited by
          #4

          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
          0

          • Login

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