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]How to enable Layouts in splitter Horizontally or Vertically in Qt Designer

[Solved]How to enable Layouts in splitter Horizontally or Vertically in Qt Designer

Scheduled Pinned Locked Moved General and Desktop
10 Posts 4 Posters 20.4k 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.
  • A Offline
    A Offline
    ankursaxena
    wrote on last edited by
    #1

    Hi all,

    I am designing an ui. so i want to use Layout Horizontally in Splitter and Layout Vertically in Splitter. but these two are in disable mode. How can i enable them so that i can use them properly.

    Thanx in Advance.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      What do you mean, disabled mode??
      Are you using designer? In my (just downloaded the latest version) designer it does not support splitters.
      In code it is easy:
      @
      QSplitter * m_MainWindowSplitter_p = new QSplitter(this->centralWidget());
      m_MainWindowSplitter_p->setOrientation(Qt::Vertical);

      // Application Layer widgets
      m_ScrollApplicationLayer_p = new QScrollArea;
      m_ScrollApplicationLayer_p->setWidgetResizable(true);
      m_ScrollApplicationLayer_p->setWidget(m_ApplicationLayer_wp);
      m_MainWindowSplitter_p->addWidget(m_ScrollApplicationLayer_p);
      

      @

      Greetz, Jeroen

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ankursaxena
        wrote on last edited by
        #3

        I am using qt creator . and my ui is opened in designer.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ankursaxena
          wrote on last edited by
          #4

          Actually I just want to set it through designer. but i can't select layout in splitter since i m not able to select them . where as i am able to use any other layout like horizontal layout, vertical layout or grid layout.

          1 Reply Last reply
          0
          • JeroentjehomeJ Offline
            JeroentjehomeJ Offline
            Jeroentjehome
            wrote on last edited by
            #5

            Ahh, I see in the new designer they added the QSplitter in the layouts.
            << Let's check it>>
            Ah,
            First do a 'break layout" on your top level widget/layout. Then you are able to select the widgets you need and select the hor/ver splitter

            Greetz, Jeroen

            1 Reply Last reply
            0
            • A Offline
              A Offline
              ankursaxena
              wrote on last edited by
              #6

              !http://postimg.org/image/pvebw3tn3/

              This is how it is showing splitter in disable mode. and i not using any layout till now so i can't click on break layout.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                ankursaxena
                wrote on last edited by
                #7

                !http://s7.postimg.org/ee1skbsyz/layout.png(scr)!

                qxoz: you can use Picture tag for posting images

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  qxoz
                  wrote on last edited by
                  #8

                  Well, it's correct. Widget could have only one layout. Other layouts must be inside this layout.
                  Take a look to "Using Layouts in Qt Designer":http://qt-project.org/doc/qt-5/designer-layouts.html

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andreyc
                    wrote on last edited by
                    #9

                    If you don't have any other layouts then to make them enabled you need to select the items that you want to split with a splitter.
                    !http://s29.postimg.org/yfr8wkopz/qtcreator_splitter_enabled.png()!

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ankursaxena
                      wrote on last edited by
                      #10

                      Thanx to all of you for your valuable suggestion. Now I am very close to solution. Till an extend it is fixed.

                      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