Using QFontDialog instead of QFontComboBox, and GUI font is no selectable

This commit is contained in:
Veronica K. B. Olsen
2020-05-31 10:52:25 +02:00
parent 688c0e853a
commit 1cd7986bfb
5 changed files with 110 additions and 32 deletions
+7 -1
View File
@@ -107,7 +107,7 @@ class QConfigLayout(QGridLayout):
return
def addRow(self, theLabel, theWidget, helpText=None, theUnit=None):
def addRow(self, theLabel, theWidget, helpText=None, theUnit=None, theButton=None):
"""Add a label and a widget as a new row of the grid.
"""
thisEntry = {
@@ -152,6 +152,12 @@ class QConfigLayout(QGridLayout):
controlBox.addWidget(QLabel(theUnit), 0, Qt.AlignVCenter)
controlBox.setSpacing(8)
self.addLayout(controlBox, self._nextRow, 1, 1, 1, Qt.AlignRight | Qt.AlignVCenter)
elif theButton is not None:
controlBox = QHBoxLayout()
controlBox.addWidget(qWidget, 0, Qt.AlignVCenter)
controlBox.addWidget(theButton, 0, Qt.AlignVCenter)
controlBox.setSpacing(8)
self.addLayout(controlBox, self._nextRow, 1, 1, 1, Qt.AlignRight | Qt.AlignVCenter)
else:
self.addWidget(qWidget, self._nextRow, 1, 1, 1, Qt.AlignRight | Qt.AlignVCenter)