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. A TreeWidget, Stacked Widget, and a Horizontal Splitter
Forum Updated to NodeBB v4.3 + New Features

A TreeWidget, Stacked Widget, and a Horizontal Splitter

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 243 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.
  • DriftwoodD Offline
    DriftwoodD Offline
    Driftwood
    wrote on last edited by Driftwood
    #1

    This is what I start with in the Designer:

    qt-001.png

    And this is how it looks when I run it:

    qt-002.png

    The treewidget takes up all the space. And I noticed in the Property Manager that i lost access to both widgets' width and height properties when I joined them with the splitter. So that made me think there might be a setting for the splitter sash position. But that's not the case, that I can see.

    How can I programmatically set widget widths when they're joined by a splitter?

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

      Hi,

      QSplitter::setSizes is what you are looking for.

      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
      1
      • DriftwoodD Offline
        DriftwoodD Offline
        Driftwood
        wrote on last edited by
        #3

        Thank you, SGaist.

        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