Results 1 to 3 of 3

Thread: QDockWidget Tabbed State

  1. #1
    Join Date
    Jul 2007
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QDockWidget Tabbed State

    Is there any way to tell when a dock widget has been docked on top of another docked widget (to form a tabbed dock window)?

    I can handle the "topLevelChanged" signal to tell me when the dock widget has been docked, but I'm not sure how to determine if it has been docked normally or added as a tabbed dock window - the dock widget's parent seems to be the same either way.

    Cheers,

    jt

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget Tabbed State

    I am afraid you cannot do that.
    The dock widgets are handled by the main window's layout. More specifically by the QDockAreaLayout. The function QDockAreaLayout::tabifyDockWidget().

    Since QDockWidgetAreaLayout is not in the public API, I do not see a way for doing this.
    Also you need QDockAreaLayoutInfo.

    A slim chance would be to include qdockwidgetlayout_p.h in your application and use the QDockAreaLyoutInfo class. It has a public method usedTabBars() which returns all the existing tabs used by the dock widgets. Maybe you can use this somehow in conjunction with the other info methods. But its a long shot to actually make this work...

    Regards

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

    jtaylor108 (2nd August 2007)

  4. #3
    Join Date
    Jul 2007
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDockWidget Tabbed State

    Many thanks for the reply. I've since had confirmation from trolltech that this functionality is indeed missing. However, there has been a request made in the task tracker.

    In the meantime I'll investigate your suggestion.

    Thanks again,

    jt

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.