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. Keep widget size fixed and add to scrollable tab
Forum Updated to NodeBB v4.3 + New Features

Keep widget size fixed and add to scrollable tab

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 309 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.
  • E Offline
    E Offline
    Ed Schneider
    wrote on last edited by
    #1

    I'm trying to create a tab which would be scrollable and fill it with table widgets where the tables to keep their original size. My tab keeps growing vertically and no scroll bar appears. How do I keep both the tab a fixed size and and all the table widgets fixed size and allow the user to scroll down the tab to see all the tables included. What I do now seems to grow the size of the tab. What's the right way to do this.

    jsulmJ 1 Reply Last reply
    0
    • E Ed Schneider

      I'm trying to create a tab which would be scrollable and fill it with table widgets where the tables to keep their original size. My tab keeps growing vertically and no scroll bar appears. How do I keep both the tab a fixed size and and all the table widgets fixed size and allow the user to scroll down the tab to see all the tables included. What I do now seems to grow the size of the tab. What's the right way to do this.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Ed-Schneider https://doc.qt.io/qt-6/qwidget.html#setFixedSize or https://doc.qt.io/qt-6/qwidget.html#setFixedHeight if you only need fixed height.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Ed-Schneider https://doc.qt.io/qt-6/qwidget.html#setFixedSize or https://doc.qt.io/qt-6/qwidget.html#setFixedHeight if you only need fixed height.

        E Offline
        E Offline
        Ed Schneider
        wrote on last edited by
        #3

        @jsulm I've been using setFixedHeight but that was not enough. Only once I added some pad to the height of the table did the setFixedHeight do the job. I've not figured out why a pad of +4 work sometimes and other times +8 or even +20 was needed. If anyone knows I'd love to hear. At this point I've got it working but have no idea why the pad required is not the same for all. Still a mystery.

        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