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. QSplitter height fixed
QtWS25 Last Chance

QSplitter height fixed

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 783 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.
  • I Offline
    I Offline
    ivanicy
    wrote on 8 Mar 2018, 10:41 last edited by
    #1

    Hello!!

    I am using a QSplitter to separate two sections of my software. Down section contains a QTableWidget which shows software notifications, so, its lines are increasing. What I want is not to allow stretching more than the height of the table.

    How can I do this?

    Thank you very much!

    V 1 Reply Last reply 8 Mar 2018, 10:50
    0
    • I ivanicy
      8 Mar 2018, 10:41

      Hello!!

      I am using a QSplitter to separate two sections of my software. Down section contains a QTableWidget which shows software notifications, so, its lines are increasing. What I want is not to allow stretching more than the height of the table.

      How can I do this?

      Thank you very much!

      V Offline
      V Offline
      VRonin
      wrote on 8 Mar 2018, 10:50 last edited by
      #2

      @ivanicy said in QSplitter height fixed:

      Down section contains a QTableWidget

      Contains or is? how do you call QSplitter::addWidget?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      I 1 Reply Last reply 8 Mar 2018, 11:01
      0
      • V VRonin
        8 Mar 2018, 10:50

        @ivanicy said in QSplitter height fixed:

        Down section contains a QTableWidget

        Contains or is? how do you call QSplitter::addWidget?

        I Offline
        I Offline
        ivanicy
        wrote on 8 Mar 2018, 11:01 last edited by
        #3

        @VRonin Yes, I have two groupbox separated by the qsplitter. Down groupbox contains a qlabel and the table

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 8 Mar 2018, 13:01 last edited by VRonin 3 Aug 2018, 13:01
          #4

          You then have to setMaximumHeight of that group box calculating it from the sizeHint of the widgets and conentMargins and spacing of the layout (or just sizeHint of the groupbox)

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          0

          2/4

          8 Mar 2018, 10:50

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved