Results 1 to 3 of 3

Thread: Layout management thoughts required

  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Layout management thoughts required

    Hi all

    I have the enviable task of porting a VB6 application to Qt. An improvement no doubt, but more than a little fun

    The primary UI of the app looks roughly like this:
    one.png
    I have labelled the components with how I expect you would lay out a QMainWindow to get the dockable widgets. The left hand tool widget would be a fixed dock widget (too complex for a QToolBar).

    The bit I would like thoughts on is this... when the user selects other tools in the tool box the central widget and all docked widgets are replaced with other widget structures (the space occupied by the green and orange boxes is replaced) . This screams QStackedWidget to me. However, if I base the central widget on a QStackedWidget I have to manually manage hiding/unhiding the dock widgets as I switch back and forth

    Is there a neater way to handle this?

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Layout management thoughts required

    Are you forced to use DockWidgets for green Widgets?

    You could use a StackedWidget and, for each page, you can use QSplitters in order to allow users to organize the workspace.
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Layout management thoughts requested

    Forced? No. In fact the existing UI is exactly the layout you see with the smaller green box represent a stack of about 10 panels of information, and the larger green box is a map. The green boxes are separated by a splitter, and there's another splitter between the green and orange boxes. I imagine a straight Qt translation of this layout would still be an improvement over the current inflexible layout.

    Some of the existing users (esp. with dual screens) have expressed the desire to be able to float the map and/or see several of the smaller panels at the same time. One way to do that is to use dock widgets, which is why I am looking. This also (potentially) allows exploiting the extra space on the right-hand-side of the orange box that wide-screen monitors give, while still being workable in a 4:3 monitor space.

    I guess a method for the user to create more vertical splits in the top half and allocate panels to them would also go some way toward meeting this desire.
    Last edited by ChrisW67; 6th July 2011 at 03:27.

Similar Threads

  1. Thoughts about Qt5
    By marcvanriet in forum General Discussion
    Replies: 0
    Last Post: 18th May 2011, 01:08
  2. Replies: 3
    Last Post: 30th May 2008, 08:37
  3. Replies: 3
    Last Post: 4th April 2008, 20:51
  4. Layout Management Issues
    By dave in forum Newbie
    Replies: 3
    Last Post: 5th November 2006, 19:16
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 13:25

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.