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. Weird layout behaviour
Qt 6.11 is out! See what's new in the release blog

Weird layout behaviour

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 228 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.
  • D Offline
    D Offline
    django.Reinhard
    wrote on last edited by
    #1

    Hi,

    I struggled through some layout behaviour, where I did not find a solution for.

    Here's a stripped down project to show the issue.

    PositionStatus is the class of interest. It's a gridlayout with some rows and columns. The second column has 2 widgets per cell, which are toggled by action.
    I started with simple QLabel elements. Then I tried to extend QLabel so that the hidden label is resized when the visible label is resized.

    I run out of ideas, how to stop that unwanted layout resizing.

    To see the issue, compile it and run it.

    • resize the main window to the minimal possible size.
    • use the action from main-menu to toggle between relative and absolute (its a checkable action).

    On first toggle the main window increases size. Don't know where it comes from - as now it is ensured, that both labels of each cell have same size.

    Even if the first size change still seems comprehensible, the second is completely absurd.

    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