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. I need some help with layouts.
Forum Updated to NodeBB v4.3 + New Features

I need some help with layouts.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.0k 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.
  • A Offline
    A Offline
    adi.hodos
    wrote on last edited by
    #1

    I'm trying to create a widget where some controls can resize while others cannot (specifically see this picture http://imgur.com/J0W6e9Y ). I've tried some combination of layouts but none of them worked as I intended. Can anyone help please ?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Batox
      wrote on last edited by
      #2

      Sorry mate, but this kind of question will not yield smart replies. Play around with the size hints, "Preferred" and "Expanding" are usually the most useful. Read the documentation.

      1 Reply Last reply
      0
      • musimbateM Offline
        musimbateM Offline
        musimbate
        wrote on last edited by
        #3

        Hi,
        Try to set a fixed size to the widgets you want to stay the same and the rest in the layout should resize as you resize the window.It should be something like

        @
        ui->nameOfYourWidget->setFixedSize(size);
        @

        Why join the navy if you can be a pirate?-Steve Jobs

        1 Reply Last reply
        0
        • TheBadgerT Offline
          TheBadgerT Offline
          TheBadger
          wrote on last edited by
          #4

          I would suggest that you do not use setFixedSize() to set the size, it might complicate things in future.

          What I do suggest:

          1. Make the Horizontal and Vertical Size policies of each of the Group Boxes 'Minimum'.
          2. Make the Horizontal and Vertical size policies of the TextLabel Expanding.
          3. Add a vertical spacer under the 2 GroupBoxes

          That should give you what you are looking for (I hope).

          (see http://imgur.com/FPxZA6d )[edit: fixed link]

          Regards,


          Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

          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