Results 1 to 3 of 3

Thread: Custom QTabBar issue when movable

Threaded 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 Custom QTabBar issue when movable

    Hi,
    I have a custom QMainWindow with a QTabBar as center widget, this is basically a tabbed window to have multiple QMainWindow inside.
    All works correctly but I have to disable the move on tab because if I enable it it gives weird behavior when I remove one tab during the move.
    Basically I stay clicked on one tab and if the cursor is outside the QTabBar then the tab is removed and the QMainWindow is then floating.
    The issue is the mouse button is not released so sometimes another tab continue to move, nothing should move anymore.
    I tried all way to disable the move when I remove one tab but no way found.. surely it absolutely wait mouse release event..
    The only way I think of is to write a custom move of tab and manage all myself.
    Is it possible to do it ? Or one hack possible ?
    Maybe a miss in QTabBar code, needs to check if the current pressed is the removed tab, maybe not safe on this case ?

    Another thing is I would know if it's possible to enable the move of the tab.
    example : I remove tab, the window is floating, I tab again
    On this situation the tab should move, the mouse button is not released.
    Only way is to simulate a click event ?

    Thanks
    Last edited by Alundra; 4th January 2018 at 13:43.

Similar Threads

  1. Using Custom QTabBar with QTabWidget.
    By tvj4218 in forum Newbie
    Replies: 2
    Last Post: 11th May 2017, 21:57
  2. movable QTabBar or QTabWidget set some tabs fixed
    By fsmoke in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2014, 01:24
  3. Replies: 0
    Last Post: 14th February 2012, 11:03
  4. Replies: 7
    Last Post: 5th June 2011, 20:12
  5. Cann't move movable items on custom graphics view
    By wojtekw in forum Qt Programming
    Replies: 2
    Last Post: 3rd March 2008, 21:30

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.