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. [SOLVED] Adding horizontal scroll bar to a QSplitter
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Adding horizontal scroll bar to a QSplitter

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.6k Views 1 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.
  • M Offline
    M Offline
    M_31
    wrote on last edited by
    #1

    I have used Horizontal QSplitter to show 2 TableWidget on my main window.
    and the splitter is configured as Horizontal layout.

    The problem is , i cant reduced the size of table Widget2 to its minimum level , when i do resize the tablewidget2 with my mouse on splitter, its getting reduced to some extend then finally the entire TableWidget2 is getting hide on my right hand side of the main Window.

    @

    | | |
    | | |
    | | |
    | | |
    | | |
    | Table | Table |
    | Widget1 | Widget2 |
    | | |
    | | |
    | | |

    @
    the tableWidget2 is going at the minimum of ..like in the picture 2, then its getting hide on the right hand side of my main window.
    but i want to reduce the TableWidget2 further...

    So is there any way to add Horizontal Scrollbar on QSplitter to attain my goal??
    @

    | | |
    | | |
    | | |
    | | |
    | | |
    | Table | Table |
    | Widget1 | Widget2 |
    | | |
    | | |
    | | |

    @

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      If you try to shrink tablewidget 2 below its minimum size (hint), it will be hidden entirely by the splitter. You can call QSplitter::setChildrenCollapsible(false) to prevent this. Maybe you should set the minimum size (hint) of the table widget 2 to some smaller value.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • M Offline
        M Offline
        M_31
        wrote on last edited by
        #3

        Thanks Volker...
        Its working now ,
        After using the setMinimumSize(hint) function .
        But not with the QSplitter::setChildrenCollapsible(false)

        Thanks for your valuable inputs..

        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