Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.1, 5.12.8, 5.14.2
-
Windows 10x64, MSVC2017x64
-
-
06b1e404c936847038cc7a371720b05f31532b6a (qt/qtbase/dev) b28c6d73c2ee3b0e7986a8ed58ae6461be1883de (qt/qtbase/6.2) a9e83563dfaa02791682ad5c601b894596822223 (qt/tqtc-qtbase/5.15) bed5306eaf91b219c27ea7c2966519aa79e44039 (qt/qtbase/6.1)
Description
To reproduce an issue, follow next steps:
1. Open TreeStandardItemModel.zip
2. Resize window in that way, that first tab do not fit into visible area for tab(part of tab is hiden under scroll butons).
3. Try to scroll first tab right. Tab does not scroll.
If you resize window, that tab will be fit to visible area, it will scroll normaly. For clear vision of issue see video issueVideo.mp4
P.S. This is regression from 5.6 version, as on Qt 5.6 everything works as expected. (I think, the reason is commit a955d9d142b33de7b60b8dfd32a23de9ae528602)
I made workaround fix for this issue, see code below, but it does not work as in 5.6 version:
void QTabBarPrivate::_q_scrollTabs() { ... else if (sender == rightB) { for (i = 0; i < tabList.count(); ++i) { //BEGINING OF WORKAROUND auto tabRect = tabList.at(i).rect; auto containsScrollRect = tabRect.contains(scrollRect); int end = horizontal ? tabRect.right() : tabRect.bottom(); if (!containsScrollRect && end > (scrollRect.right() + scrollOffset)) { //ENDD OF WORKAROUND makeVisible(i); return; } } } }
Attachments
Issue Links
- duplicates
-
QTBUG-59571 The right scroll button of QTabBar does not work
- Closed
- relates to
-
QTBUG-50866 QTabBar scroll buttons overlap tabs
- Closed