Skip to content

Commit

Permalink
Fixed centering in ComboBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Peter Krone committed Nov 3, 2024
1 parent b90fdb1 commit 02fc792
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/iminuit/qtwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ def __init__(self):
self.reset_button.clicked.connect(self.on_reset_button_clicked)
button_layout.addWidget(self.reset_button)
self.algo_choice = QtWidgets.QComboBox(parent=button_group)
self.algo_choice.setStyleSheet("QComboBox { text-align: center; }")
self.algo_choice.setEditable(True)
self.algo_choice.lineEdit().setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.algo_choice.lineEdit().setReadOnly(True)
self.algo_choice.addItems(["Migrad", "Scipy", "Simplex"])
button_layout.addWidget(self.algo_choice)
interactive_layout.addWidget(button_group, 0, 1, 1, 1)
Expand Down

0 comments on commit 02fc792

Please sign in to comment.