Results 1 to 5 of 5

Thread: QDockArea in Qt4...

  1. #1
    Join Date
    Feb 2009
    Posts
    29
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QDockArea in Qt4...

    I want to create a dockable area in my Qt4-based application. I am aware of Q3DockArea, and would rather not use that, but it does seem to provide what I want - though I want to work with QDockWidgets instead.

    I realize QMainWindow handles dockable widgets itself, but I don't want to have yet another main window in my application - I already have one, and this would be embedding one inside another - I want this as part of the central widget.

    Background:

    The application uses a QMainWindow for its main interface. The central widget of that main window is a QStackWidget. Each QWidget that is added to the QStackWidget is providing some specific functionality, one of which is the primary screen for the application. I'd really like to have the primary screen be something that is more user configurable (think like how KDevelop and Visual Studios IDEs) where the user can rearrange the view - place things where they want them, move them around, snap things together and move them as a block, etc.

    I know the dock area won't provide everything (e.g. the snap together and move as a block), but I'd rather not implement anything more than I have to - I don't have the time to spare.

    I know I can implement something using the QGridLayout; but a Qt4 QDockArea would probably do best. (Think of it as the central widget.)

    I'm sure other people out there would like to do something similar. Is there anything that already exists that does this?

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockArea in Qt4...

    havent u seen the dock widgets example in Qt demo..isnt that what u need precisely?

  3. #3
    Join Date
    Feb 2009
    Posts
    29
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockArea in Qt4...

    Just to be sure - I just looked at it, and no - that's not what I need; namely because it has a central widget, which I don't want; similar though.

    What I want to be able to rearrange widgets. Similar to moving a dock widget from one side of the screen to the other, only I want to be able to have it take up the central area too.

    So widgets X, Y, Z could be ordered in any of the following from left to right across the layout:
    Y X Z
    X Y Z
    Z Y X
    Z X Y
    X Z Y
    Y Z X

    that's quite different than what QMainWindow provides, which is what that demo shows - QDockWidgets inside a QMainWindow; which is explicitly not what I want.

    I think I can achieve this with a QDockAreaLayout - and just make it the whole layout; but there is none in Qt4.

  4. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockArea in Qt4...

    you do have the option of creating that layout then..and when u r done, be kind enough to share it with the rest of the world

  5. #5
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockArea in Qt4...

    I guess you will need to add drag drop functionality.
    You could look into designer code how they do it. I guess thats what you want ...

Similar Threads

  1. QDockArea size hint
    By ksierens in forum Qt Programming
    Replies: 2
    Last Post: 5th April 2006, 15:37

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.