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. [SOLVED] problem with textEdit layout
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] problem with textEdit layout

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.2k Views 1 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.
  • K Offline
    K Offline
    kalster
    wrote on last edited by
    #1

    i have a docked widget with a textEdit and a pushButton on it. I would like to set the textEdit width to the max width of the dock widget. the problem is when i set layout vertically or layout in a grid, the pushButton changes size and i don't want that. how to set the textEdit width to the dock widget width without resizing the pushButton? i am using the form designer

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      You could use a spacer on the left or right of the pushbutton.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Set a horizontal spacer next to the button in your layout.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kalster
          wrote on last edited by
          #4

          how to maximize the textEdit to the dock widget current width?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            Again: put it in a layout.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Robbin
              wrote on last edited by
              #6

              In Qt Designer you can put spacer in the layouts, so layout elements wouldn't get resized (the spacer will "resize"). Even if your button resizes at first within the new layout, you can always set it's max width and height, so it will be as long and tall as you want, within the layout you need him to be in.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kalster
                wrote on last edited by
                #7

                thank you Eus. thank you everybody. i never knew that i could resize the buttons after the layout was made. this topic is solved.

                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