Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide6 layout issue
Forum Updated to NodeBB v4.3 + New Features

PySide6 layout issue

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for pythonpysidepython
3 Posts 2 Posters 742 Views 2 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.
  • F Offline
    F Offline
    fackym
    wrote on last edited by CristianMaureira
    #1

    I am currently working on an app that displays stories stored in a database. I am in the process of designing the user interface and have created a prototype in PowerPoint PowerPoint .
    The layout consists of a scroll area as the parent container, followed by a horizontal layout where multiple vertical layouts (or "columns") are placed. However, I am facing a challenge in maintaining a consistent vertical spacing of approximately 10px between each column.
    The code I've tested so far has resulted in either the widgets becoming too short or the spacing becoming distorted when calculated based on the tallest widget's height . This leads to an excessive amount of spacing when there are shorter widgets present.

    See my amazing spaghetti like code here and here

    my first thought is that the order in wich the widgets are added to the horizontal layout because to add the widgets correctly the layout needs the size of them but as they are not shown then the size given by sizehint is wrong most of the time at least until they are shown.

    Any suggestions or solutions would be greatly appreciated.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fackym
      wrote on last edited by
      #2

      or if there is another way to achieve the same result, a grid like layout that support dynamic height widgets. it works for me too

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        You might be interested in the Flow Layout example.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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