79283402

Date: 2024-12-16 00:15:39
Score: 0.5
Natty:
Report link
I encountered the same problem on Mac OS and confirm the same fix worked 
for me.  
I will try to report it as a fault if I can find an appropriate channel.

from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QApplication, QComboBox, 
QVBoxLayout, QWidget, QStyleFactory
class ComboBoxExample(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("QComboBox with Fusion Style")
        self.setGeometry(100, 100, 800, 600)
        layout = QVBoxLayout()
        combo_box = QComboBox()
        combo_box.addItems(['1','2','3'])
        combo_box.setFixedHeight(150)  # Set height to 150px
        layout.addWidget(combo_box)
        self.setLayout(layout)

 if __name__ == "__main__":
    app = QApplication([])
    # Apply Fusion style
    app.setStyle(QStyleFactory.create("Fusion"))
    window = ComboBoxExample()
    window.show()
    app.exec()
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: William