Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.0, 5.11.2, 5.12.2
-
None
-
macOS 10.13.6 with 10.14 sdk
-
-
409e3eab092ae9896f453b69f4b4749e654680bb (qt/qtbase/5.12)
Description
Many of the bugs related to QTabBar and QTabWidget already reported for Qt 5.9 through Qt-5.12 are seemingly not fixed in Qt-5.12.2.
These include: QTBUG-61092 where the close button is missing from every tab even in hover.
See no_tab_close.png
The only way I could find to workaround the missing close tab was to:
{
TabBar::TabBar(QWidget *parent)
: QTabBar(parent),
m_TabManager(parent),
m_TabIndex(-1)
{
#if defined(Q_OS_MAC)
// work around Qt MacOSX bug missing tab close icons
// see: https://bugreports.qt.io/browse/QTBUG-61092
// still broken in document mode in Qt.5.12.2 !!!!
const QString FORCE_TAB_CLOSE_BUTTON =
"QTabBar::close-button
"
"QTabBar::close-button:hover
";
setStyleSheet(FORCE_TAB_CLOSE_BUTTON);
#endif
}
}
Use of an Icon image on a QTabBar/QTabWidget Tab messes title text and makes it so eliding is next to worthless. This includes QTBUG-61235, QTBUG-61742, QTBUG-63445, QTBUG-64630.
See tab_icon_hides_text.png (when elided set to none)
See image_overlaps_elide.png (when elided)
If you remove the icon image from the tab (which is the only workaround) then all appears to work properly:
See okay_without_icon.png
See okay_elided.png
So something in qmacstyle_mac.mm seems to be still quite messed up when it comes to using an image in a tab on mac OS with Qt-5.12.2