Hi,
I have a class that inherits from QTabBar. Tabs in this tab bar may embed a window handler or a qml page. After I have moved a tab from left (index 0 for instance) to right (last index), the content of the moved tab (now at the last index) is in now the content of the tab at index 0 (after the move).
The move is done by QTabBar::moveTab().
tabbar->moveTab(tabbar->tabAt(m_dragStartPos), tabbar->tabAt (m_dragDropedPos));
tabbar->moveTab(tabbar->tabAt(m_dragStartPos), tabbar->tabAt (m_dragDropedPos));
To copy to clipboard, switch view to plain text mode
So I thinked of a
setCurrentIndex(tabbar->tabAt (m_dragDropedPos))
setCurrentIndex(tabbar->tabAt (m_dragDropedPos))
To copy to clipboard, switch view to plain text mode
but it did not work.
But when I do a removeTab(), addTab() and setCurrentIndex(), the result is good but the tab is always moved at the end of the TabBar.
Thanks for your help
Bookmarks