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. Delete stretches from layout
Forum Updated to NodeBB v4.3 + New Features

Delete stretches from layout

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.6k 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.
  • T Offline
    T Offline
    trex6
    wrote on last edited by
    #1

    Is anybody know, how I can remove stretches from layout after QBoxLayout::addStretch()?

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

      I think QLayout::takeAt() should do what you want, but you need to know the index of the item in the layout. That could be errorphrone, as that index is not returned to you directly. You will first have to search for it, perhaps by iterating over the QLayoutItems in the layout and checking the type of each item you find.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        trex6
        wrote on last edited by
        #3

        Thank you for your answer. It's very helpful for me.

        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