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. QGroupBox size
Forum Updated to NodeBB v4.3 + New Features

QGroupBox size

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 352 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.
  • S Offline
    S Offline
    Stefanoxjx
    wrote on last edited by
    #1

    Hi at all,
    I use a QTableWidget inside a QGroupBox.
    The problem is that the QGroupBox doesn't resize to contains the QTableWidget and then I see this last cutted.
    My idea (but if you have a better idea I haven't a problem to ear you) is to set size of QGroupBox when the QMainWindow drawing finished.
    The problem is that I know that when QMainWindow finish the drawing emit a signal, but I don't remember which signal and I didn't even find it in the documentation.
    Can you help me?
    Thanks.

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

      Hi,

      Did you put a layout on your QGroupBox ?

      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
      • S Offline
        S Offline
        Stefanoxjx
        wrote on last edited by Stefanoxjx
        #3

        Hi SGaist,
        Yes, I added QVBoxLayout because on top of QGroupBox I've some widgets and below a QTableWidget.
        But now I tried:

        tw->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
        

        and seems to solve my problem very good.

        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