Results 1 to 12 of 12

Thread: QDockWidget + QTabBar, but tabs don't move

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Oct 2014
    Posts
    81
    Thanks
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt5
    Platforms
    Windows
    Wiki edits
    7

    Default Re: QDockWidget + QTabBar, but tabs don't move

    What platform are you using?
    I'm also playing around with QDockWidget tabs with Windows XP, Qt 5.3.2, and when I setMovable( true ), it does work, I can grab and reorder the tabs.
    But then the tab names start swapping around and eventually the application crashes with "QWidget::repaint Recursive repaint detected."
    I just set the movable property, I don't force the current index.

    I don't think movable tabs are possible with the dynamic QTabBars created from the dock widget layout system, as it is. Their painting must do something out of the ordinary.
    If you could manage to at least relocate dock tabs through code (if not by moving tabs, then by some other means like hiding\unhiding, retabifying etc.), you could then install an event filter on the tab bar and have a "snappy," non animated tag dragging by processing tab mouse events and dragging yourself. I'm using this to achieve detachable dock tabs.

    In any case, you should also try to read the source of qdockwidget.cpp and qdockarealayout.cpp to see if there's anything that can be done without tampering with the source:
    https://qt.gitorious.org/qt/qt/sourc...rc/gui/widgets
    Last edited by Kryzon; 3rd January 2015 at 23:18.

Similar Threads

  1. movable QTabBar or QTabWidget set some tabs fixed
    By fsmoke in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2014, 01:24
  2. Replies: 1
    Last Post: 8th January 2012, 22:37
  3. Replies: 0
    Last Post: 17th November 2011, 11:51
  4. QTabBar make all tabs out of focus
    By migel in forum Newbie
    Replies: 1
    Last Post: 24th August 2011, 12:38
  5. QTabBar color in space inbetween tabs
    By AwDogsgo2Heaven in forum Newbie
    Replies: 1
    Last Post: 12th March 2010, 08:44

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.