Results 1 to 4 of 4

Thread: Arrange Widgets in QSplitter

  1. #1
    Join Date
    Jun 2011
    Location
    India
    Posts
    14
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Arrange Widgets in QSplitter

    Hi, I need to place three widgets into a QSplitter.
    The problem i face is that i need to align first two widgets horizontally and to that i want to align the third widget vertically. I could not find a solution , all I was able to do was to align all three either vertically or horizontally.

    Thanks
    Vinod

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Arrange Widgets in QSplitter

    You can add first two widgets to a horizontal layout and align this layout with third widget in a vertical splitter.

  3. #3
    Join Date
    Jun 2011
    Location
    India
    Posts
    14
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Arrange Widgets in QSplitter

    But QSplitter accepts only QWidgets right? so how will i add a layout into the splitter

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Arrange Widgets in QSplitter

    If you use designer, open the right click menu while selecting both layout and third widget, there will be an option to arrange in a splitter.
    If you want to do that from the code, create a fourth widget and add the layout to it. Then arrange fourth and third widgets in a splitter. Code generated from designer form looks like that, try to create a test form and generate the code (using 'uic') for reference.

  5. The following user says thank you to stampede for this useful post:

    vinodpaul (7th September 2012)

Similar Threads

  1. QSplitter and re-arranging widgets within
    By poppenspeler in forum Newbie
    Replies: 1
    Last Post: 19th October 2011, 21:48
  2. How to remove widgets from QSplitter?
    By mcb in forum Qt Programming
    Replies: 2
    Last Post: 23rd July 2009, 06:10
  3. How to set Widgets sizes with in QSplitter
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 07:38
  4. QSplitter - Remove Widgets?
    By durbrak in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2006, 12:17
  5. Remove widgets from a QSplitter
    By blukske in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2006, 10:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.