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

QSplitter height fixed

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 867 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.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on 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!

    VRoninV 1 Reply Last reply
    0
    • ivanicyI ivanicy

      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!

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on 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

      ivanicyI 1 Reply Last reply
      0
      • VRoninV VRonin

        @ivanicy said in QSplitter height fixed:

        Down section contains a QTableWidget

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

        ivanicyI Offline
        ivanicyI Offline
        ivanicy
        wrote on 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
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #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

          • Login

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