I’ve used QTabWidget successfully on windows 10 in the past without an issue.
However using on a mac running macOS 11.0.1 I am seeing the text of the selected tab, when it has focus, being blanked out.
The tab text (gets unblanked) only appears when the tab looses focus:
I suspect there is perhaps a style setting to fix this. However I would have expected the default to do sensible things.
Any ideas?
Version data as follows:
PYQT_VERSION = 329986
PYQT_VERSION_STR = 5.9.2
QOpenGLVersionProfile = <class ‘PyQt5.QtGui.QOpenGLVersionProfile’>
QOperatingSystemVersion = <class ‘PyQt5.QtCore.QOperatingSystemVersion’>
QT_VERSION = 329990
QT_VERSION_STR = 5.9.6
Hey there! I’ve made a little test application and ran it on macOS 10.15 (Catalina) and the tabs appear to be working correctly there.
from PyQt5.QtWidgets import QTabWidget, QApplication, QWidget
app = QApplication([])
tab = QTabWidget()
w = QWidget()
tab.addTab(w, 'Hello')
w = QWidget()
tab.addTab(w, 'Test')
w = QWidget()
tab.addTab(w, 'Another')
tab.show()
app.exec_()
…which shows the following (tested dark mode also) –
Can you try this test to rule out any issues specific to your application? If this example doesn’t work I can try upgrading one of my machines to 11.0 myself. Or perhaps you can try PyQt5 5.15.2 (latest) ?
Slightly against my better judgement I pip installed PyQt5 5.15.2 into the failing conda environment.
Which fixed the issue. Not intending to make an installable version for a while, when I might regret this!
Ah great, glad that’s fixed it – I wasn’t looking forward to upgrading my mac!
I’ve leave a note that you’ve done this in your requirements.txt / docs or similar, so you don’t forget when you come to build. Easy to lose hours on forgotten quick fixes!