Results 1 to 4 of 4

Thread: MDI with resizable sections

  1. #1
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    101
    Thanked 15 Times in 15 Posts

    Default MDI with resizable sections

    Hello!

    I want to write a program with a GUI that is divided into four tiles. The tiles should be resizable with a "cross" in the middle. For example, ftp clients have typically two tiles, one on the left and one on the right, with a bar in the middle that can be used to shrink the left half and grow the right half.

    Is the QMdiArea the right thing to start from? I definately don't need any cascading though. It will always be four tiles and this cross like resizing is an important feature.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: MDI with resizable sections

    I would go for three QSplitter's which you have to synchronize to emulate the "cross" behavior.

  3. The following user says thank you to Lykurg for this useful post:

    Cruz (26th December 2011)

  4. #3
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    101
    Thanked 15 Times in 15 Posts

    Default Re: MDI with resizable sections

    If this was Facebook, I would press the like button now.

  5. #4
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    101
    Thanked 15 Times in 15 Posts

    Default Re: MDI with resizable sections

    It works just like I wanted, but there is one problem. The splitters are only one pixel wide and very hard to grab with the mouse. I'm unable to make the splitters bigger with either using setHandleWidth() or using style sheets

    Qt Code:
    1. QSplitter::handle {
    2. background-color: rgb(150,150,150);
    3. width: 10px;
    4. }
    5.  
    6. QSplitter::handle:horizontal {
    7. background-color: rgb(150,150,150);
    8. width: 10px;
    9. }
    10.  
    11. QSplitter::handle:vertical {
    12. background-color: rgb(150,150,150);
    13. height: 10px;
    14. }
    To copy to clipboard, switch view to plain text mode 

    Any ideas?

Similar Threads

  1. How to create sections on a Qwt Plot
    By dvez43 in forum Qwt
    Replies: 3
    Last Post: 23rd November 2011, 12:19
  2. Connecting different GUI sections
    By ajb in forum Qt Programming
    Replies: 4
    Last Post: 13th May 2009, 12:47
  3. Replies: 4
    Last Post: 19th April 2007, 14:17

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
  •  
Qt is a trademark of The Qt Company.