Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Getting SplitterBar to use all the space available
Forum Updated to NodeBB v4.3 + New Features

Getting SplitterBar to use all the space available

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 494 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    QtDesigner :

    I have been trying to get a splitter bar working with a QMainWindow.

    The main windows has a central Widget called centralWidget.

    To that I added a QWidget and a QStackedWidget

    I then selected them both and selected to lay them out horizontally in a splitter.

    I expected the Splitter to fill the space availbale in the central widget, but it didn't ... Do I need to apply a layout the centralWidget as well?

    Update: Looks like the answer to that is YES I do. Somewhat surprised, but if that's what's needed!
    David

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

      Hi,

      The splitter should be the central widget. Then you will get the result 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
      0
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        Strange because I can't delete the central Widget so how can I replace it with a splitter?

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

          Sorry, I am used to build UI 100% in code.

          I do not remember if you can replace the central widget in designer. If that is not the case, you can change it in the .ui file directly.

          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

          • Login

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