Results 1 to 20 of 26

Thread: [SOLVED] Detachable QDockWidget tabs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [SOLVED] Detachable QDockWidget tabs

    Quote Originally Posted by wysota View Post
    Just launch Qt Designer and start dragging the tabs around.
    In code I think this is controlled via QMainWindow::dockOptions property (and friends). MainWindow::AllowTabbedDocks is the flag that should be set to enable tabbing.
    I tried, the title bar is automatically removed by default but then you must reshow it to undock and you don't have the cross on the tab bar, that looks to be basic behavior of Qt, just the automatic hiding added. The example shown in this topic add the cross and allows undock when click on the tab name and automatic hide the titlebar.
    Stuff can be changed :
    - less empty line in code.
    - empty code in destructor is not needed (DetachableDock::~DetachableDock()).
    - friend is not necessary to be used in DetachableDock, a lot of professionnal dislike to use friend, I'm in the group.
    - why pointer for tabBarList of DetachableDockManager ?
    - That's better to write DetachableDock generic and inherit it for the sample.
    - I would prefer include the code of SyntheticMouseEvent inside global namespace of DockManager since that's the only place used.
    Last edited by Alundra; 23rd January 2015 at 17:49.

  2. The following user says thank you to Alundra for this useful post:

    Kryzon (24th January 2015)

Similar Threads

  1. QDockWidget + QTabBar, but tabs don't move
    By NIteLordz in forum Qt Programming
    Replies: 11
    Last Post: 22nd January 2015, 17:06
  2. Area for detachable QDialogs within QGridLayout
    By nicole.cpp in forum Newbie
    Replies: 3
    Last Post: 15th April 2014, 17:02
  3. Dragable QDockWidget tabs with no title bar?
    By nige in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2013, 15:39
  4. Replies: 7
    Last Post: 8th April 2009, 08:42
  5. [SOLVED] QDockWidget::setVisible() doesn't work
    By Oleg in forum Qt Programming
    Replies: 2
    Last Post: 4th January 2008, 20:27

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.