Mr_S_J_Childerley | 2021-01-06 18:58:45 UTC | #1
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 =
martin | 2021-01-06 20:17:47 UTC | #2
PyQt/PySide 1:1 Coaching with Martin Fitzpatrick — Get one on one help with your Python GUI projects. Working together with you I'll identify issues and suggest fixes, from bugs and usability to architecture and maintainability.
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) ?
Mr_S_J_Childerley | 2021-01-06 21:01:50 UTC | #3
Thanks Martin, with your example I got the same.
I'll try/attempt the upgrade to PyQt5 5.15.2
Purchasing Power Parity
Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]Appreciated.
Mr_S_J_Childerley | 2021-01-06 21:28:25 UTC | #4
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!
martin | 2021-01-07 08:12:06 UTC | #5
Ah great, glad that's fixed it -- I wasn't looking forward to upgrading my mac! :slight_smile:
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!
Create GUI Applications with Python & Qt5 by Martin Fitzpatrick — (PyQt5 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!