QDarkStyleSheet
QDarkStyleSheet copied to clipboard
QMenu section text not visible
Describe Your Environment
* OPERATING SYSTEM---------------------------------------------------------------
- System........................ Linux
- Release....................... 6.3.3-arch1-1
- Platform...................... Linux-6.3.3-arch1-1-x86_64-with-glibc2.37
- Version....................... #1 SMP PREEMPT_DYNAMIC Sun, 21 May 2023 16:15:22 +0000
* PYTHON DISTRIBUTION------------------------------------------------------------
- Version....................... 3.11.3
- C Compiler.................... GCC 13.1.1 20230429
- C API Version................. 1013
- Implementation................ cpython
- Implementation Version........ 3.11.3
* QT BINDINGS--------------------------------------------------------------------
- PySide2 Version............... 5.15.10
- PySide2 Qt Version............ 5.15.10
* QT ABSTRACTIONS----------------------------------------------------------------
- qtpy Version.................. 2.3.1
- qtpy Binding.................. pyside2
- qtpy Binding Variable......... os.environ['QT_API']
- qtpy Import Name.............. qtpy
- qtpy Status................... OK
* PYTHON PACKAGES----------------------------------------------------------------
- helpdev....................... 0.7.1
- QDarkStyle.................... 3.1
Language
[Python]
Description / Steps to Reproduce [if necessary]
To reproduce, run the following example code and click the button:
import sys
import qdarkstyle
from PySide2 import QtWidgets
class TestWidget(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.menu = QtWidgets.QMenu()
self.menu.addAction("Turtle")
self.menu.addSection("Teapot")
self.menu.addAction("Lemur")
self.button = QtWidgets.QPushButton("Click Me")
self.button.setMenu(self.menu)
self.setCentralWidget(self.button)
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
window = TestWidget()
app.setStyleSheet(qdarkstyle.load_stylesheet_pyside2())
window.show()
app.exec_()
Actual Result
The "Teapot" section text is missing:
Expected Results / Proposed Result
(the same code but with app.setStyleSheet(...) commented out.